[SCM] polybori: Polynomials over Boolean Rings branch, master, updated. upstream/0.8.2-27-g5b0594b

Alexander Dreyer adreyer at gmx.de
Fri Dec 21 00:39:34 UTC 2012


The following commit has been merged in the master branch:
commit 5b0594b24ca7431f30ce6c931b90c6f0caf60f0a
Author: Alexander Dreyer <adreyer at gmx.de>
Date:   Fri Dec 21 01:17:37 2012 +0100

    Supporting polybori.pc

diff --git a/SConstruct b/SConstruct
index 2f58ee6..1b181d0 100644
--- a/SConstruct
+++ b/SConstruct
@@ -435,6 +435,9 @@ def setup_env(defaultenv):
 
     opts.Add('CONFFILE', "Dump settings to file, if given", '')
 
+    opts.Add('PKGCONFIGFILE', "Write settings to pkg-config file, if given", '')
+    opts.Add('TMPINSTALLDIR', "Temporary installation directory, if given", '') 
+                                                                                
     opts.Add('PLATFORM', "Manually set another platform (unusual)",
              defaultenv['PLATFORM'])
 
@@ -1745,6 +1748,34 @@ if 'install' in COMMAND_LINE_TARGETS:
         env.AlwaysBuild(conffile)
         env.Alias('install', conffile)
     
+    pkgconfigfilename = env['PKGCONFIGFILE']
+    if pkgconfigfilename:
+        def build_pcfile(target, source, env):
+            from string import Template
+            page = """
+prefix=$PREFIX
+exec_prefix=$${prefix}
+includedir=$DEVEL_INCLUDE_PREFIX
+libdir=$DEVEL_LIB_PREFIX
+
+Name: polybori
+Description: The PolyBoRi library
+URL: http://polybori.sourceforge.net
+Version: %s
+Requires: $GD_LIBS
+Cflags: $CXXFLAGS $CCFLAGS $_CCCOMCOM
+Libs: $LINKFLAGS $SOURCES $_LIBDIRFLAGS $_LIBFLAGS ${_stripixes(LIBLINKPREFIX, GD_LIBS, LIBLINKSUFFIX, LIBPREFIXES, LIBSUFFIXES, __env__)}
+            """ % (pboriversion + '.' + pborirelease)
+            page = env.subst(page).replace(env.subst("$TMPINSTALLDIR"),'') + '\n'
+            open(str(target[0]), 'w').writelines(page)
+
+            return None
+
+        pcfile = env.Command(pkgconfigfilename, 'SConstruct', build_pcfile)
+        env.AlwaysBuild(pcfile)
+        env.Alias('install', pcfile)
+
+
 
 env.Alias('prepare-devel', dylibs + stlibs + readabledevellibs)
 env.Alias('prepare-install', [pyroot, DocPath()])
diff --git a/debian/patches/0003_support_pkgconfig.patch b/debian/patches/0003_support_pkgconfig.patch
new file mode 100644
index 0000000..ffdd5eb
--- /dev/null
+++ b/debian/patches/0003_support_pkgconfig.patch
@@ -0,0 +1,66 @@
+Description: Supporting pkg-config file
+ The upstream patch allows for exporting the current built config
+ to a pkg-config .pc file.
+ .
+ polybori (0.8.2-1) unstable; urgency=low
+ .
+   * Updating to recent Debian standards
+Author: Alexander Dreyer <adreyer at gmx.de>
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: upstream, https://bitbucket.org/brickenstein/polybori/commits/a7e1c046d4db93f6eda5ed77000bf6b402957841/raw/ 
+Bug: https://bitbucket.org/brickenstein/polybori/commits/a7e1c046d4db93f6eda5ed77000bf6b402957841/raw/
+Forwarded: not-needed
+Last-Update: 2012-12-21
+
+--- polybori-0.8.2.orig/SConstruct
++++ polybori-0.8.2/SConstruct
+@@ -435,6 +435,9 @@ def setup_env(defaultenv):
+ 
+     opts.Add('CONFFILE', "Dump settings to file, if given", '')
+ 
++    opts.Add('PKGCONFIGFILE', "Write settings to pkg-config file, if given", '')
++    opts.Add('TMPINSTALLDIR', "Temporary installation directory, if given", '') 
++                                                                                
+     opts.Add('PLATFORM', "Manually set another platform (unusual)",
+              defaultenv['PLATFORM'])
+ 
+@@ -1745,6 +1748,34 @@ if 'install' in COMMAND_LINE_TARGETS:
+         env.AlwaysBuild(conffile)
+         env.Alias('install', conffile)
+     
++    pkgconfigfilename = env['PKGCONFIGFILE']
++    if pkgconfigfilename:
++        def build_pcfile(target, source, env):
++            from string import Template
++            page = """
++prefix=$PREFIX
++exec_prefix=$${prefix}
++includedir=$DEVEL_INCLUDE_PREFIX
++libdir=$DEVEL_LIB_PREFIX
++
++Name: polybori
++Description: The PolyBoRi library
++URL: http://polybori.sourceforge.net
++Version: %s
++Requires: $GD_LIBS
++Cflags: $CXXFLAGS $CCFLAGS $_CCCOMCOM
++Libs: $LINKFLAGS $SOURCES $_LIBDIRFLAGS $_LIBFLAGS ${_stripixes(LIBLINKPREFIX, GD_LIBS, LIBLINKSUFFIX, LIBPREFIXES, LIBSUFFIXES, __env__)}
++            """ % (pboriversion + '.' + pborirelease)
++            page = env.subst(page).replace(env.subst("$TMPINSTALLDIR"),'') + '\n'
++            open(str(target[0]), 'w').writelines(page)
++
++            return None
++
++        pcfile = env.Command(pkgconfigfilename, 'SConstruct', build_pcfile)
++        env.AlwaysBuild(pcfile)
++        env.Alias('install', pcfile)
++
++
+ 
+ env.Alias('prepare-devel', dylibs + stlibs + readabledevellibs)
+ env.Alias('prepare-install', [pyroot, DocPath()])
diff --git a/debian/patches/series b/debian/patches/series
index 1907bcb..c6741cc 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 0001-add-doc-Makefile-to-assist-cleaning.patch
 0002-customize-library-version.patch
+0003_support_pkgconfig.patch
diff --git a/debian/rules b/debian/rules
index d2edde0..42859e4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -27,7 +27,8 @@ build-python%:
 		CCFLAGS="$(shell dpkg-buildflags --get CPPFLAGS)" \
 		CFLAGS="$(shell dpkg-buildflags --get CFLAGS)" \
 		CXXFLAGS="$(shell dpkg-buildflags --get CXXFLAGS)" \
-		LIBRARY_VERSION="1.0.0"
+		LIBRARY_VERSION="1.0.0" \
+		PKGCONFIGFILE=$(TMPDEST)/usr/lib/pkgconfig/polybori.pc TMPINSTALLDIR=$(TMPDEST)
 	-mkdir -p $(TMPDEST)
 	scons install devel-install INSTALLDIR=$(TMPDEST)/usr/share/polybori \
 		PYINSTALLPREFIX=$(TMPDEST)$(PYTHONSITE) MANDIR=$(TMPDEST)/usr/share/man \
@@ -38,7 +39,9 @@ build-python%:
 		CCFLAGS="$(shell dpkg-buildflags --get CPPFLAGS)" \
 		CFLAGS="$(shell dpkg-buildflags --get CFLAGS)" \
 		CXXFLAGS="$(shell dpkg-buildflags --get CXXFLAGS)" \
-		LIBRARY_VERSION="1.0.0"
+		LIBRARY_VERSION="1.0.0" \
+                PKGCONFIGFILE=$(TMPDEST)/usr/lib/pkgconfig/polybori.pc TMPINSTALLDIR=$(TMPDEST)
+
 
 install-%:
 	-mkdir debian/tmp/

-- 
polybori: Polynomials over Boolean Rings



More information about the debian-science-commits mailing list