]> matita.cs.unibo.it Git - helm.git/commitdiff
binding to gtkmathview 0.3.1
authorStefano Zacchiroli <zack@upsilon.cc>
Tue, 21 Jan 2003 14:41:56 +0000 (14:41 +0000)
committerStefano Zacchiroli <zack@upsilon.cc>
Tue, 21 Jan 2003 14:41:56 +0000 (14:41 +0000)
helm/DEVEL/lablgtkmathview/Makefile.in
helm/DEVEL/lablgtkmathview/configure.in
helm/DEVEL/lablgtkmathview/debian/changelog
helm/DEVEL/lablgtkmathview/debian/control
helm/DEVEL/lablgtkmathview/debian/liblablgtkmathview-ocaml-dev.dirs
helm/DEVEL/lablgtkmathview/debian/liblablgtkmathview-ocaml.dirs
helm/DEVEL/lablgtkmathview/debian/liblablgtkmathview-ocaml.files
helm/DEVEL/lablgtkmathview/debian/rules

index 61d4a106dd60122f8299cd5c0b32ce35de773429..bae76cfa9f9f145b547c83e5a938bdeabf9498a7 100644 (file)
@@ -7,38 +7,43 @@ OBJECTS =  gtk_mathview.cmo gtkMathView.cmo gMathView.cmo
 OBJECTS_OPT = gtkMathView.cmx gtk_mathview.cmx gMathView.cmx
 INST = META gMathView.mli gMathView.cmi gtkMathView.cmi gtk_mathview.cmi
 DIST_FILES = \
-  AUTHORS COPYING ChangeLog LICENSE Makefile.in NEWS README \
-  configure.in gMathView.ml gMathView.mli gtkMathView.ml \
+  Makefile.in configure.in gMathView.ml gMathView.mli gtkMathView.ml \
   gtk_mathview.ml ml_gtk_mathview.c META.in .depend debian/ test/ \
   configure lablgtkmathview.spec lablgtkmathview.spec.in
-DOC_FILES = AUTHORS COPYING ChangeLog NEWS README
+DIST_DIR = $(PACKAGE)-$(VERSION)
+DOC_FILES = AUTHORS COPYING ChangeLog NEWS README LICENSE
 REQUIRES = gdome2 lablgtk
 PREDICATES =
-MLFLAGS = -labels
+SHARED_LIBS = \
+       `gdome-config --libs` \
+       $(shell gtkmathview-config --libs | sed 's/-rdynamic//g') \
+       -lmlgdome
 
-OCAMLC = ocamlfind ocamlc $(MLFLAGS)
-OCAMLOPT = ocamlfind ocamlopt $(MLFLAGS)
+OCAMLC = ocamlfind ocamlc
+OCAMLOPT = ocamlfind ocamlopt
 OCAMLDEP = ocamldep
+OCAMLMKLIB = ocamlmklib
+OCAML_STUB_DIR = @OCAML_STUB_DIR@
 
-ARCHIVE = $(PACKAGE).cma
-ARCHIVE_A = $(PACKAGE).a
-ARCHIVE_SO = dll$(PACKAGE).so
-ARCHIVE_OPT = $(PACKAGE).cmxa
+ARCHIVE = $(PACKAGE)
+DLL = dll$(ARCHIVE).so
 
 TESTDIR = ./test
 TMPDIR = .test
 TMPPKGDIR = $(TMPDIR)/$(PACKAGE)
 
-all: $(ARCHIVE) $(ARCHIVE_SO) $(TESTDIR)/test
-
-opt: $(OBJECTS_C) $(ARCHIVE_OPT) $(ARCHIVE_A) $(ARCHIVE_SO) #$(TESTDIR)/test.opt
+all: $(ARCHIVE).cma $(TESTDIR)/test
+opt: $(ARCHIVE).cmxa $(TESTDIR)/test.opt
+world: all opt
 
 dist:
-       rm -rf $(PACKAGE)-$(VERSION)
-       mkdir $(PACKAGE)-$(VERSION)
-       cp -a $(DIST_FILES) $(DOC_FILES) $(PACKAGE)-$(VERSION)
-       tar cvfz $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)
-       rm -rf $(PACKAGE)-$(VERSION)
+       rm -rf $(DIST_DIR)/
+       mkdir $(DIST_DIR)/
+       cp -a $(DIST_FILES) $(DOC_FILES) $(DIST_DIR)/
+       -find $(DIST_DIR) -name CVS -type d -exec rm -rf {} \;
+       -find $(DIST_DIR) -name .cvsignore -type f -exec rm {} \;
+       tar cvfz $(DIST_DIR).tar.gz $(DIST_DIR)/
+       rm -rf $(DIST_DIR)/
 
 ml_gtk_mathview.o: ml_gtk_mathview.c
        gcc -c -I$(INCLUDEDIR) -fPIC `ocamlfind query -i-format lablgtk` `glib-config --cflags` `gtk-config --cflags` `gtkmathview-config --cflags` `gdome-config --cflags` `ocamlfind query -i-format gdome2` $<
@@ -46,59 +51,46 @@ ml_gtk_mathview.o: ml_gtk_mathview.c
 .SUFFIXES: .cmo .cmi .cmx .ml .mli
 
 .ml.cmo:
-       $(OCAMLC) -package "$(REQUIRES)" -predicates "$(PREDICATES)" \
-                  -c $<
+       $(OCAMLC) -package "$(REQUIRES)" -predicates "$(PREDICATES)" -c $<
 .mli.cmi:
-       $(OCAMLC) -package "$(REQUIRES)" -predicates "$(PREDICATES)" \
-                  -c $<
+       $(OCAMLC) -package "$(REQUIRES)" -predicates "$(PREDICATES)" -c $<
 .ml.cmx:
-       $(OCAMLOPT) -package "$(REQUIRES)" -predicates "$(PREDICATES)" \
-                  -c $<
+       $(OCAMLOPT) -package "$(REQUIRES)" -predicates "$(PREDICATES)" -c $<
 
 depend: *.ml *.mli
        $(OCAMLDEP) *.ml *.mli >.depend
 include .depend
 
-$(ARCHIVE): $(OBJECTS) $(ARCHIVE_SO)
-       $(OCAMLC) -a -package "$(REQUIRES)" \
-        -predicates "$(PREDICATES)" -o $@ $^ \
-        -cclib "`glib-config --libs` `gdome-config --libs` `gtkmathview-config --libs`" -dllib -l$(PACKAGE)
-$(ARCHIVE_OPT) $(ARCHIVE_A): $(OBJECTS_OPT)
-       $(OCAMLOPT) -a -package "$(REQUIRES)" \
-        -predicates "$(PREDICATES)" -o $@ $^ \
-        -cclib "`glib-config --libs` `gdome-config --libs` `gtkmathview-config --libs`" \
-               -cclib "@OCAML_LIB_DIR@/stublibs/$(ARCHIVE_SO)"
-
-$(ARCHIVE_SO): $(OBJECTS_C)
-       gcc -shared -o $@ $< `gtkmathview-config --libs` -lmlgdome -L `ocamlfind query gdome2` -Xlinker -rpath -Xlinker `ocamlfind query gdome2`
-
-
+$(ARCHIVE).cma $(DLL): $(OBJECTS) $(OBJECTS_C)
+       $(OCAMLMKLIB) -o $(ARCHIVE) -L$(OCAML_STUB_DIR) $^ $(SHARED_LIBS)
+$(ARCHIVE).cmxa $(ARCHIVE).a: $(OBJECTS_OPT)
+       $(OCAMLMKLIB) -o $(ARCHIVE) -L$(OCAML_STUB_DIR) $^ $(OBJECTS_C) $(SHARED_LIBS)
 
-$(TESTDIR)/test: $(OBJECTS_C) $(ARCHIVE) $(TESTDIR)/test.ml
+$(TESTDIR)/test: $(OBJECTS_C) $(ARCHIVE).cma $(TESTDIR)/test.ml
        mkdir -p $(TMPPKGDIR)
-       cp $(OBJECTS_C) $(ARCHIVE_SO) $(ARCHIVE) $(INST) $(TMPPKGDIR)
+       cp $(OBJECTS_C) $(DLL) $(ARCHIVE).cma $(INST) $(TMPPKGDIR)
        cd $(TESTDIR) ; export OCAMLPATH=../$(TMPDIR):$$OCAMLPATH ; make
        rm -r $(TMPDIR)
 
-$(TESTDIR)/test.opt: $(OBJECTS_C) $(ARCHIVE_A) $(ARCHIVE_OPT) $(TESTDIR)/test.ml
+$(TESTDIR)/test.opt: $(OBJECTS_C) $(ARCHIVE).a $(ARCHIVE).cmxa $(TESTDIR)/test.ml
        mkdir -p $(TMPPKGDIR)
-       cp $(OBJECTS_C) $(ARCHIVE_A) $(ARCHIVE_OPT) $(INST) $(TMPPKGDIR)
+       cp $(OBJECTS_C) $(ARCHIVE).a $(ARCHIVE).cmxa $(INST) $(TMPPKGDIR)
        cd $(TESTDIR) ; export OCAMLPATH=../$(TMPDIR):$$OCAMLPATH ; make opt
        rm -r $(TMPDIR)
 
 install:
-       test ! -f $(ARCHIVE_OPT) || extra="$(ARCHIVE_A) $(ARCHIVE_OPT)" ; \
+       test ! -f $(ARCHIVE).cmxa || extra="$(ARCHIVE).a $(ARCHIVE).cmxa" ; \
        if [ "$(PREFIX)" = "" ]; then \
-               ocamlfind install $(PACKAGE) $(OBJECTS_C) $(ARCHIVE) $(ARCHIVE_SO) $(INST) $$extra; \
+               ocamlfind install $(PACKAGE) $(OBJECTS_C) $(ARCHIVE).cma $(DLL) $(INST) $$extra; \
        else \
-               ocamlfind install -destdir $(PREFIX) $(PACKAGE) $(OBJECTS_C) $(ARCHIVE) $(ARCHIVE_SO) $(INST) $$extra; \
+               ocamlfind install -destdir $(PREFIX) $(PACKAGE) $(OBJECTS_C) $(ARCHIVE).cma $(DLL) $(INST) $$extra; \
        fi
 
 uninstall:
        ocamlfind remove $(PACKAGE)
 
 clean:
-       rm -f *.o *.cm? $(ARCHIVE) $(ARCHIVE_A) $(ARCHIVE_SO) $(ARCHIVE_OPT)
+       rm -f *.[ao] *.cm[iaxo] *.cmxa *.so
        cd $(TESTDIR) ; make clean
        rm -rf $(TMPDIR)
 
index a72efd51bbe332c37763c00b1fe95ecf728f0a1d..ad50a9ad103b476237f71555ac7d79c78675035c 100644 (file)
@@ -4,7 +4,7 @@ PACKAGE=lablgtkmathview
 
 LABLGTKMATHVIEW_MAJOR_VERSION=0
 LABLGTKMATHVIEW_MINOR_VERSION=3
-LABLGTKMATHVIEW_MICRO_VERSION=0
+LABLGTKMATHVIEW_MICRO_VERSION=1
 LABLGTKMATHVIEW_VERSION=$LABLGTKMATHVIEW_MAJOR_VERSION.$LABLGTKMATHVIEW_MINOR_VERSION.$LABLGTKMATHVIEW_MICRO_VERSION
 VERSION=$LABLGTKMATHVIEW_VERSION
 
@@ -33,6 +33,7 @@ ocamlfind query lablgtk ||
 
 AC_MSG_CHECKING("for the ocaml library dir")
 OCAML_LIB_DIR=`ocamlc -where`
+OCAML_STUB_DIR="$OCAML_LIB_DIR/stublibs"
 AC_MSG_RESULT($OCAML_LIB_DIR)
 
 AC_CHECK_FILE(/usr/include/caml/mlvalues.h,
@@ -44,6 +45,7 @@ AC_SUBST(PACKAGE)
 AC_SUBST(VERSION)
 AC_SUBST(OCAML_INCLUDE_DIR)
 AC_SUBST(OCAML_LIB_DIR)
+AC_SUBST(OCAML_STUB_DIR)
 
 AC_OUTPUT([
   test/Makefile
index cf735ba06ad5b0c44d0f417d5aee83327262f5b8..03990cc6762d202cef7080ea474e5e09ea574820 100644 (file)
@@ -1,3 +1,13 @@
+lablgtkmathview (0.3.1-1) unstable; urgency=low
+
+  * Binding to gtkmathview 0.3.1
+  * debian/control
+    - bumped Standards Version to 3.5.8
+    - deps and build deps to ocaml{,-base}-3.06-1
+  * Moved lib stuff to /usr/lib/ocaml/3.06
+
+ -- Stefano Zacchiroli <zack@debian.org>  Tue,  7 Jan 2003 12:57:47 +0100
+
 lablgtkmathview (0.3.0-10) unstable; urgency=low
 
   * Added dep on liblablgtk-ocaml{,-dev} respectively in
index 76b227606f66132b6046db2bb8fb5c33cbab7cd6..6947a794ee9a8346e587fd2143f85aac0bdaaab3 100644 (file)
@@ -2,13 +2,13 @@ Source: lablgtkmathview
 Section: devel
 Priority: optional
 Maintainer: Stefano Zacchiroli <zack@debian.org>
-Build-Depends: debhelper (>> 4.0.0), ocaml-3.06, ocaml-findlib (>= 0.7.1), liblablgtk-ocaml-dev (>= 1.2.3), libgdome2-ocaml-dev (>= 0.0.3-4), libgtkmathview-dev (>= 0.3.0-2), libxml2-dev, libgdome2-dev, libgdome2-cpp-smart-dev, t1lib-dev (>= 1.3)
-Standards-Version: 3.5.6
+Build-Depends: debhelper (>> 4.0.0), ocaml-3.06-1, ocaml-findlib, liblablgtk-ocaml-dev, libgdome2-ocaml-dev-0.1.4, libgtkmathview-dev (>= 0.3.1), libxml2-dev, libgdome2-dev, libgdome2-cpp-smart-dev, t1lib-dev (>= 1.3)
+Standards-Version: 3.5.8
 
 Package: liblablgtkmathview-ocaml
 Architecture: any
 Section: libs
-Depends: ocaml-base-3.06, liblablgtk-ocaml, libgdome2-ocaml, ${shlibs:Depends}
+Depends: ocaml-base-3.06-1, liblablgtk-ocaml, libgdome2-ocaml, ${shlibs:Depends}
 Description: OCaml binding for libgtkmathview
  This is the Ocaml binding for the GtkMathView widget, that is
  currently available in the libgtkmathview0 package.
@@ -18,7 +18,7 @@ Description: OCaml binding for libgtkmathview
 Package: liblablgtkmathview-ocaml-dev
 Architecture: any
 Section: devel
-Depends: ocaml-3.06, liblablgtk-ocaml-dev, libgtkmathview0 (>= 0.3.0), liblablgtkmathview-ocaml (= ${Source-Version}), ocaml-findlib
+Depends: ocaml-3.06-1, liblablgtk-ocaml-dev, libgtkmathview0 (>= 0.3.1), liblablgtkmathview-ocaml (= ${Source-Version}), ocaml-findlib
 Description: OCaml binding for libgtkmathview
  These are the Ocaml bindings for the GtkMathView widget, that is
  currently available in the libgtkmathview0 package.
index 0a4cde7df693f0a64f6f91863986fc128f4a206a..dd368536ab43a3b6f1d5b04fbe3ef3b1704d44e5 100644 (file)
@@ -1,2 +1,2 @@
-usr/lib/ocaml
-usr/lib/ocaml/stublibs
+usr/lib/ocaml/3.06
+usr/lib/ocaml/3.06/stublibs
index 00a96aed3ffcdab50ae6ef9ec144dd0f89d38e60..8fd99951383753f9b700b1d7fb1879c0c8c524a8 100644 (file)
@@ -1 +1 @@
-usr/lib/ocaml
+usr/lib/ocaml/3.06
index c72f751ceb90a1236f867e60e46a874c42585a87..cd2f92f955b33d50219c59b4064ebe52e6aa849a 100644 (file)
@@ -1,2 +1,2 @@
-usr/lib/ocaml/lablgtkmathview/*.so
-usr/lib/ocaml/stublibs/*
+usr/lib/ocaml/3.06/lablgtkmathview/*.so
+usr/lib/ocaml/3.06/stublibs/*
index 86221bf6f618358628155f91cf5ec69d4845724d..601b933c415e300629ed21708f05a12ee3300f74 100755 (executable)
@@ -46,7 +46,7 @@ install: build
 
        # trick: redifine CAMLLIB so that findlibd doesn't try to modify the
        # official /var/lib/ocaml/ld.conf
-       $(MAKE) install PREFIX=$(TARGETDIR)/usr/lib/ocaml
+       $(MAKE) install PREFIX=$(TARGETDIR)/usr/lib/ocaml/3.06
 
 movefiles: install
        dh_movefiles -p liblablgtkmathview-ocaml --sourcedir=$(TARGETDIR)