--- pycaml-0.82.orig/debian/Makefile +++ pycaml-0.82/debian/Makefile @@ -0,0 +1,23 @@ +OCAMLMAKEFILE = /usr/share/ocamlmakefile/OCamlMakefile +PY_PREFIX = $(shell python getprefix.py) +PY_VERSION = $(shell python getversion.py) +CLIBS = python2.5 pthread dl util m c + +SOURCES = pycaml.ml pycaml_ml.c +RESULT = pycaml +THREADS = yes +NO_CUSTOM = NO_CUSTOM +CFLAGS = -fPIC + +LIBDIRS = $(PY_PREFIX)/lib/python$(PY_VERSION)/config +INCDIRS = $(PY_PREFIX)/include/python$(PY_VERSION) +OCAMLLDFLAGS = -linkall + +allopt: native-code-library byte-code-library pycaml.customtop + +all: byte-code-library pycaml.customtop + +pycaml.customtop: pycaml.cma + ocamlmktop -o pycaml.customtop pycaml.cma + +-include $(OCAMLMAKEFILE) --- pycaml-0.82.orig/debian/README.Debian +++ pycaml-0.82/debian/README.Debian @@ -0,0 +1,22 @@ +Pycaml for Debian +----------------- + +You can find some example Pycaml programs in /usr/share/doc/pycaml/examples. + +Here's how you build programs: + +BYTECODE COMPILATION +-------------------- + +ocamlc pycaml.cma yourfile.ml -o output + +Note that "custom" mode is implied. + +NATIVE COMPILATION +------------------ + +ocamlopt pycaml.cmxa yourfile.ml -o output + + +-- John Goerzen + February 24, 2004 --- pycaml-0.82.orig/debian/TODO.Debian +++ pycaml-0.82/debian/TODO.Debian @@ -0,0 +1 @@ +* Split the package and make a -dev. --- pycaml-0.82.orig/debian/changelog +++ pycaml-0.82/debian/changelog @@ -0,0 +1,137 @@ +pycaml (0.82-9) unstable; urgency=low + + [ Stephane Glondu ] + * Fix dependencies and location of dllpycaml_stubs.so (thanks to + Michael Bienia). + + [ Samuel Mimram ] + * Rebuild with OCaml 3.11. + * Switch packaging to git. + * Use dh-ocaml. + * Update compat to 7. + * Update standards version to 3.8.0. + * Remove useless lintian override. + + -- Samuel Mimram Thu, 05 Mar 2009 18:26:01 +0100 + +pycaml (0.82-8) unstable; urgency=low + + [ Stefano Zacchiroli ] + * fix vcs-svn field to point just above the debian/ dir + + [ Sylvain Le Gall ] + * Use dpatch + * Apply provided patches to wrap Py_* function call, thanks to + Christopher L. Conway (Closes: #477010) + * Update to python 2.5 + * Rebuild for ocaml 3.10.2 + * Add myself to uploaders + + -- Sylvain Le Gall Fri, 23 May 2008 14:31:13 +0200 + +pycaml (0.82-7) unstable; urgency=low + + * Rebuild with OCaml 3.10. + + -- Samuel Mimram Sat, 08 Sep 2007 01:05:09 +0200 + +pycaml (0.82-6) unstable; urgency=low + + * Changed dependency on ocaml-tools to ocamlmakefile (Ralf Treinen). + + -- Samuel Mimram Mon, 04 Jun 2007 22:01:35 +0200 + +pycaml (0.82-5) unstable; urgency=low + + * Update to python 2.4 (thanks Andreas Jochens), closes: #392174. + + -- Samuel Mimram Tue, 10 Oct 2006 21:48:02 +0000 + +pycaml (0.82-4) unstable; urgency=low + + * Rebuild with OCaml 3.09.2. + * Updated standards version to 3.7.2, no changes needed. + + -- Samuel Mimram Thu, 18 May 2006 22:45:18 +0000 + +pycaml (0.82-3) unstable; urgency=low + + * Rebuild with OCaml 3.09.1. + + -- Samuel Mimram Sun, 8 Jan 2006 19:11:44 +0100 + +pycaml (0.82-2) unstable; urgency=low + + * Rebuild with OCaml 3.09.0. + * No longer hardcoding OCaml's ABI in debian/* files. + * Updated FSF's address in copyright. + * Updated watch file. + + -- Samuel Mimram Mon, 19 Dec 2005 20:55:21 +0100 + +pycaml (0.82-1) unstable; urgency=low + + * New maintainer, closes: #305455. + * New upstream release. + * Updated to OCaml 3.08.3. + * Updated Standards-Version to 3.6.2. + + -- Samuel Mimram Thu, 28 Jul 2005 16:35:54 +0200 + +pycaml (0.81-9) unstable; urgency=low + + * Orphaning this package. + + -- John Goerzen Tue, 19 Apr 2005 22:56:31 -0500 + +pycaml (0.81-8) unstable; urgency=low + + * Rebuilt for OCaml 3.08. + + -- John Goerzen Tue, 27 Jul 2004 09:28:50 -0500 + +pycaml (0.81-7) unstable; urgency=low + + * debian/rules: clean now removes config.cache. + + -- John Goerzen Thu, 22 Apr 2004 09:27:25 -0500 + +pycaml (0.81-6) unstable; urgency=low + + * Oops, the CFLAGS change for -fPIC didn't really make it in to -5. + Fixed. Closes: #237688. + + -- John Goerzen Thu, 22 Apr 2004 09:23:04 -0500 + +pycaml (0.81-5) unstable; urgency=low + + * Worked around some OCamlMakefile brokkenness relating to OCamlMaketop. + Reassigned 242138 to ocaml-tools since it's a bug there. + * Added -fPIC to CFLAGS. Closes: #237688. + + -- John Goerzen Wed, 21 Apr 2004 13:55:58 -0500 + +pycaml (0.81-4) unstable; urgency=low + + * Don't build native-code library on platforms that lack ocamlopt. + Closes: #237666. + + -- John Goerzen Fri, 12 Mar 2004 11:34:24 -0600 + +pycaml (0.81-3) unstable; urgency=low + + * Fixed build-dep on python-dev. Closes: #236940. + + -- John Goerzen Fri, 12 Mar 2004 09:21:28 -0600 + +pycaml (0.81-2) unstable; urgency=low + + * Added missing "Files:" section to doc-base. + + -- John Goerzen Tue, 24 Feb 2004 14:43:48 -0600 + +pycaml (0.81-1) unstable; urgency=low + + * Initial Release. Closes: #234572. + + -- John Goerzen Tue, 24 Feb 2004 10:27:29 -0600 --- pycaml-0.82.orig/debian/compat +++ pycaml-0.82/debian/compat @@ -0,0 +1 @@ +7 --- pycaml-0.82.orig/debian/control +++ pycaml-0.82/debian/control @@ -0,0 +1,18 @@ +Source: pycaml +Section: libdevel +Priority: optional +Maintainer: Debian OCaml Maintainers +Uploaders: Samuel Mimram , Sylvain Le Gall +Build-Depends: debhelper (>= 7), python-support (>= 0.3), dh-ocaml, ocaml-nox (>= 3.11), python-dev (>= 2.3), ocamlmakefile, dpatch +Standards-Version: 3.8.0 +Vcs-Git: git://git.debian.org/git/pkg-ocaml-maint/packages/pycaml.git +Vcs-Browser: http://git.debian.org/?p=pkg-ocaml-maint/packages/pycaml.git + +Package: pycaml +Architecture: any +Depends: ocaml-base-nox-${F:OCamlABI}, ocaml-interp, ${shlibs:Depends} +Recommends: ocaml-nox-${F:OCamlABI} +Description: OCaml bindings to embed Python interpreter and objects + Pycaml is intended to allow users to build native OCaml libraries and + use them from Python, and conversely, in order to allow OCaml users + to benefit from linkable libraries provided for Python. --- pycaml-0.82.orig/debian/copyright +++ pycaml-0.82/debian/copyright @@ -0,0 +1,25 @@ +This package was debianized by John Goerzen on +Tue, 24 Feb 2004 10:27:29 -0600. + +It was downloaded from http://pycaml.sourceforge.net/ + +Upstream Author: Art Yerkes + +Copyright (C) Art Yerkes 2002-2005 + + This package is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +On Debian systems, the complete text of the GNU Lesser General +Public License can be found in `/usr/share/common-licenses/LGPL'. --- pycaml-0.82.orig/debian/dirs +++ pycaml-0.82/debian/dirs @@ -0,0 +1 @@ +usr/bin --- pycaml-0.82.orig/debian/docs +++ pycaml-0.82/debian/docs @@ -0,0 +1 @@ +pycaml.html --- pycaml-0.82.orig/debian/examples +++ pycaml-0.82/debian/examples @@ -0,0 +1 @@ +ocamlobj.ml pycamltest.ml --- pycaml-0.82.orig/debian/gbp.conf +++ pycaml-0.82/debian/gbp.conf @@ -0,0 +1,2 @@ +[DEFAULT] +pristine-tar = True --- pycaml-0.82.orig/debian/pycaml.doc-base +++ pycaml-0.82/debian/pycaml.doc-base @@ -0,0 +1,9 @@ +Document: pycaml +Title: Pycaml Manual +Author: Art Yerkes +Abstract: This manual describes the usage of Pycaml, an OCaml to Python interface. +Section: Programming/OCaml + +Format: HTML +Index: /usr/share/doc/pycaml/pycaml.html +Files: /usr/share/doc/pycaml/pycaml.html --- pycaml-0.82.orig/debian/pycompat +++ pycaml-0.82/debian/pycompat @@ -0,0 +1 @@ +2 --- pycaml-0.82.orig/debian/rules +++ pycaml-0.82/debian/rules @@ -0,0 +1,112 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +include /usr/share/ocaml/ocamlvars.mk +include /usr/share/ocaml/ocamlinit.mk +include /usr/share/dpatch/dpatch.make + +# These are used for cross-compiling and for saving the configure script +# from having to guess our platform (since we know it already) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + +DESTDIR = $(CURDIR)/debian/pycaml/$(OCAML_STDLIB_DIR) + +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + INSTALL_PROGRAM += -s +endif + +config.status: configure + dh_testdir + + #CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info + +build: ocamlinit build-stamp +build-stamp: config.status patch-stamp + dh_testdir + + cp debian/Makefile . +ifneq ($(OCAML_OPT_ARCH),) + $(MAKE) allopt +else + $(MAKE) all +endif + #$(MAKE) opt + + touch build-stamp + +clean: clean1 unpatch ocamlinit-clean +clean1: + dh_testdir + dh_testroot + rm -f build-stamp + + [ ! -f Makefile ] || $(MAKE) clean +#ifneq "$(wildcard /usr/share/misc/config.sub)" "" +# cp -f /usr/share/misc/config.sub config.sub +#endif +#ifneq "$(wildcard /usr/share/misc/config.guess)" "" +# cp -f /usr/share/misc/config.guess config.guess +#endif + + dh_clean + -rm -f *.cm* *.mli *.a *.o config.log *.opt *.so pycaml.customtop Makefile config.status + -rm -rf ./._d + -rm -f config.cache + +install: build + dh_testdir + dh_testroot + dh_prep + dh_installdirs + + mkdir -p $(DESTDIR) + mkdir -p $(DESTDIR)/stublibs + #cp pycaml.{a,cma,cmi,cmx,cmxa} pycaml_ml.o pycaml_ml.opt.o \ + # debian/pycaml/usr/lib/ocaml/3.07 + #cp pycamltop debian/pycaml/usr/bin + make rawinstall OCAML_LIB_INSTALL=$(DESTDIR) + mv $(DESTDIR)/dllpycaml_stubs.so $(DESTDIR)/stublibs + cp pycaml.customtop debian/pycaml/usr/bin/pycamltop + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installexamples + dh_install + dh_installman + dh_link + # MUST NOT strip the -custom executables! + dh_strip -Xpycamltop + #strip debian/pycaml/usr/bin/*.opt + dh_compress + dh_fixperms + dh_pysupport + dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol -- -VF:OCamlABI="$(OCAML_ABI)" + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install ocamlinit patch unpatch clean1 --- pycaml-0.82.orig/debian/watch +++ pycaml-0.82/debian/watch @@ -0,0 +1,3 @@ +version=3 + +http://sf.net/pycaml/pycaml-([0-9\.]*)\.tar\.gz debian uupdate --- pycaml-0.82.orig/debian/patches/00list +++ pycaml-0.82/debian/patches/00list @@ -0,0 +1 @@ +wrap_pycall --- pycaml-0.82.orig/debian/patches/wrap_pycall.dpatch +++ pycaml-0.82/debian/patches/wrap_pycall.dpatch @@ -0,0 +1,158 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## wrap_pycall.dpatch by Sylvain Le Gall +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ +diff -urNad trunk~/Makefile.in trunk/Makefile.in +--- trunk~/Makefile.in 2003-09-17 07:30:15.000000000 +0200 ++++ trunk/Makefile.in 2008-05-23 14:27:28.057334979 +0200 +@@ -5,6 +5,8 @@ + PY_PREFIX=@PY_PREFIX@ + PY_VERSION=@PY_VERSION@ + SYSLIBS=@PY_LIBS@ ++OCAMLC=ocamlc ++OCAMLMKTOP=ocamlmktop + + # + # The rest is automatic +@@ -18,23 +20,23 @@ + all: pycamltop pycamltest ocamlobj + + pycamltop: pycaml_ml.o pycaml.cmo +- ocamlmktop -thread -custom -o $@ $(LIBS) ++ $(OCAMLMKTOP) -thread -custom -o $@ $(LIBS) + + pycaml_ml.o: pycaml_ml.c +- ocamlc -thread -ccopt -c -ccopt -g \ ++ $(OCAMLC) -thread -ccopt -c -ccopt -g \ + -ccopt -I$(PY_PREFIX)/include/python$(PY_VERSION) $< + + pycaml.cmo: pycaml.ml +- ocamlc -thread -c $< ++ $(OCAMLC) -thread -c $< + + pycamltest: pycamltest.ml pycaml.cmo pycaml_ml.o +- ocamlc -custom -thread -ccopt -g $(LIBS) pycamltest.ml -o $@ ++ $(OCAMLC) -custom -thread -ccopt -g $(LIBS) pycamltest.ml -o $@ + + ocamlobj: ocamlobj.ml pycaml.cmo pycaml_ml.o +- ocamlc -custom -thread -ccopt -g $(LIBS) ocamlobj.ml -o $@ ++ $(OCAMLC) -custom -thread -ccopt -g $(LIBS) ocamlobj.ml -o $@ + + clean: + rm -rf *.o *.cmi *.cmo pycamltop pycamltest ocamlobj + + distclean: clean +- rm -rf config.cache autom4te.cache config.status Makefile +\ No newline at end of file ++ rm -rf config.cache autom4te.cache config.status Makefile +diff -urNad trunk~/pycaml.ml trunk/pycaml.ml +--- trunk~/pycaml.ml 2002-05-29 06:39:11.000000000 +0200 ++++ trunk/pycaml.ml 2008-05-23 14:27:28.057334979 +0200 +@@ -318,7 +318,8 @@ + (* 43 *) + let pyslice_getindices = fmt43call (pnf ()) + (* 44 *) +-let pyrange_new = fmt44call (pnf ()) ++(* PyRange_New has been removed from the API *) ++(* let pyrange_new = fmt44call (pnf ()) *) + + (* Error handling definitions *) + +diff -urNad trunk~/pycaml_ml.c trunk/pycaml_ml.c +--- trunk~/pycaml_ml.c 2004-12-02 17:17:07.000000000 +0100 ++++ trunk/pycaml_ml.c 2008-05-23 14:27:28.061334863 +0200 +@@ -666,7 +666,8 @@ + /* 43 */ + DL_IMPORT(int) PySlice_GetIndices(PySliceObject *r, int length, int *start, int *stop, int *step); + /* 44 */ +-DL_IMPORT(PyObject *) PyRange_New(long, long, long, int); ++/* PyRange_New has been removed from the API */ ++/* DL_IMPORT(PyObject *) PyRange_New(long, long, long, int); */ + + /* Error handling definitions */ + +@@ -897,6 +898,27 @@ + CAMLreturn(*v); + } + ++int wrap_PyRun_SimpleString(const char *s) { return PyRun_SimpleString(s); } ++int wrap_PyRun_AnyFile(FILE *f, const char * p) { return PyRun_AnyFile(f,p); } ++int wrap_PyRun_AnyFileEx(FILE *f, const char * p, int c) { return PyRun_AnyFileEx(f,p,c); } ++int wrap_PyRun_SimpleFile(FILE *f, const char * p) { return PyRun_SimpleFile(f,p); } ++int wrap_PyRun_SimpleFileEx(FILE *f, const char * p, int c) { return PyRun_SimpleFileEx(f,p,c); } ++int wrap_PyRun_InteractiveOne(FILE *f, const char * p) { return PyRun_InteractiveOne(f,p); } ++int wrap_PyRun_InteractiveLoop(FILE *f, const char * p) { return PyRun_InteractiveLoop(f,p); } ++PyObject * wrap_PyRun_String(const char *str, int s, PyObject * g, PyObject * l) { ++ return PyRun_String(str,s,g,l); ++} ++PyObject * wrap_PyRun_File(FILE *f, const char *p, int s, PyObject * g, PyObject * l) { ++ return PyRun_File(f,p,s,g,l); ++} ++PyObject *wrap_PyRun_FileEx(FILE *f, const char *p, int s, PyObject * g, PyObject * l,int c) { ++ return PyRun_FileEx(f,p,s,g,l,c); ++} ++PyObject * wrap_Py_CompileString(const char *str, const char *p, int s) { ++ return Py_CompileString(str,p,s); ++} ++ ++ + /* Create the function table */ + + typedef struct _python_func_table { +@@ -919,16 +941,16 @@ + /* 4 */ + { (void *)Py_IsInitialized, 4, "Py_IsInitialized" }, + /* 5 */ +- { (void *)PyRun_SimpleString, 5, "PyRun_SimpleString" }, ++ { (void *)wrap_PyRun_SimpleString, 5, "PyRun_SimpleString" }, + /* 6 */ +- { (void *)PyRun_AnyFile, 6, "PyRun_AnyFile" }, +- { (void *)PyRun_SimpleFile, 6, "PyRun_SimpleFile" }, +- { (void *)PyRun_InteractiveOne, 6, "PyRun_InteractiveOne" }, +- { (void *)PyRun_InteractiveLoop, 6, "PyRun_InteractiveLoop" }, ++ { (void *)wrap_PyRun_AnyFile, 6, "PyRun_AnyFile" }, ++ { (void *)wrap_PyRun_SimpleFile, 6, "PyRun_SimpleFile" }, ++ { (void *)wrap_PyRun_InteractiveOne, 6, "PyRun_InteractiveOne" }, ++ { (void *)wrap_PyRun_InteractiveLoop, 6, "PyRun_InteractiveLoop" }, + { (void *)Py_FdIsInteractive, 6, "Py_FdIsInteractive" }, + /* 7 */ +- { (void *)PyRun_AnyFileEx, 7, "PyRun_AnyFileEx" }, +- { (void *)PyRun_SimpleFileEx, 7, "PyRun_SimpleFileEx" }, ++ { (void *)wrap_PyRun_AnyFileEx, 7, "PyRun_AnyFileEx" }, ++ { (void *)wrap_PyRun_SimpleFileEx, 7, "PyRun_SimpleFileEx" }, + /* 8 */ + { (void *)Py_GetProgramName, 8, "Py_GetProgramName" }, + { (void *)Py_GetPythonHome, 8, "Py_GetPythonHome" }, +@@ -942,13 +964,13 @@ + { (void *)Py_GetCompiler, 8, "Py_GetCompiler" }, + { (void *)Py_GetBuildInfo, 8, "Py_GetBuildInfo" }, + /* 9 */ +- { (void *)PyRun_String, 9, "PyRun_String" }, ++ { (void *)wrap_PyRun_String, 9, "PyRun_String" }, + /* 10 */ +- { (void *)PyRun_File, 10, "PyRun_File" }, ++ { (void *)wrap_PyRun_File, 10, "PyRun_File" }, + /* 11 */ +- { (void *)PyRun_FileEx, 11, "PyRun_FileEx" }, ++ { (void *)wrap_PyRun_FileEx, 11, "PyRun_FileEx" }, + /* 12 */ +- { (void *)Py_CompileString, 12, "Py_CompileString" }, ++ { (void *)wrap_Py_CompileString, 12, "Py_CompileString" }, + + /* Object */ + /* 13 */ +@@ -1062,8 +1084,9 @@ + { (void *)PySlice_New, 42, "PySlice_New" }, + /* 43 */ + { (void *)PySlice_GetIndices, 43, "PySlice_GetIndices" }, +-/* 44 */ +- { (void *)PyRange_New, 44, "PyRange_New" }, ++/* 44 */ ++ /* PyRange_New has been removed from the API */ ++ /* { (void *)PyRange_New, 44, "PyRange_New" }, */ + + /* Error handling definitions */ +