| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
ifneq (,$(filterscip-debian debian libint2 2.7.2-1.2 libint2/rules/filter. $(DEB_BUILD_ARCHscip-debian debian libint2 2.7.2-1.2 libint2/rules/DEB_BUILD_ARCH.),mips mipsel armhf armel hppa m68k powerpc sh4 x32)) |
| 5 |
LMAX=4 |
| 6 |
DEB_CXXFLAGS_MAINT_APPEND += --param ggc-min-expand=20 |
| 7 |
ifneq (,$(filter $(DEB_BUILD_ARCH),mips mipsel)) |
| 8 |
CXX_OPTFLAGS=-g0 -Os -Wall -DNDEBUG |
| 9 |
else |
| 10 |
CXX_OPTFLAGS=-g0 -O2 -Wall -DNDEBUG |
| 11 |
endif |
| 12 |
else |
| 13 |
LMAX=5 |
| 14 |
CXX_OPTFLAGS=-g -O2 -Wall -DNDEBUG |
| 15 |
endif |
| 16 |
DEB_HOST_MULTIARCHscip-debian debian libint2 2.7.2-1.2 libint2/rules/DEB_HOST_MULTIARCH. := $(shellscip-debian debian libint2 2.7.2-1.2 libint2/rules/shell. dpkg-architecture -qDEB_HOST_MULTIARCH) |
| 17 |
|
| 18 |
UPSTREAM_VERSIONscip-debian debian libint2 2.7.2-1.2 libint2/rules/UPSTREAM_VERSION.=$$(dpkg-parsechangelog -S Version | sed -e s/^[0-9]*:// -e 's/-[^-]*$$//') |
| 19 |
CPPFLAGSscip-debian debian libint2 2.7.2-1.2 libint2/rules/CPPFLAGS.=-I/usr/include/eigen3 |
| 20 |
|
| 21 |
export CPPFLAGSscip-debian debian libint2 2.7.2-1.2 libint2/rules/CPPFLAGS. |
| 22 |
export DEB_CXXFLAGS_MAINT_APPENDscip-debian debian libint2 2.7.2-1.2 libint2/rules/DEB_CXXFLAGS_MAINT_APPEND. |
| 23 |
|
| 24 |
%scip-debian debian libint2 2.7.2-1.2 libint2/rules/`%`().: |
| 25 |
dh $@ --sourcedir=sourcedir |
| 26 |
|
| 27 |
|
| 28 |
override_dh_auto_configurescip-debian debian libint2 2.7.2-1.2 libint2/rules/override_dh_auto_configure().: prepare_sourcedir |
| 29 |
dh_auto_configurescip-debian debian debhelper . dh_auto_configure(). -- \ |
| 30 |
-DLIBINT2_BUILD_SHARED_AND_STATIC_LIBS=ON \ |
| 31 |
-DENABLE_FORTRAN=ON \ |
| 32 |
-DLIBINT2_INSTALL_CMAKEDIR="/usr/share/cmake/libint2" \ |
| 33 |
-DLIBINT2_INSTALL_LIBDIR="/usr/lib/$(DEB_HOST_MULTIARCHscip-debian debian libint2 2.7.2-1.2 libint2/rules/DEB_HOST_MULTIARCH.)" |
| 34 |
|
| 35 |
prepare_sourcedirscip-debian debian libint2 2.7.2-1.2 libint2/rules/prepare_sourcedir().: |
| 36 |
dh_auto_configurescip-debian debian debhelper . dh_auto_configure(). --sourcedir=$(CURDIRscip-debian debian libint2 2.7.2-1.2 libint2/rules/CURDIR.) -- \ |
| 37 |
--with-cxxgen-optflags='$(CXX_OPTFLAGSscip-debian debian libint2 2.7.2-1.2 libint2/rules/CXX_OPTFLAGS.)' \ |
| 38 |
--with-cxx-optflags='$(CXX_OPTFLAGSscip-debian debian libint2 2.7.2-1.2 libint2/rules/CXX_OPTFLAGS.)' \ |
| 39 |
--enable-eri=1 \ |
| 40 |
--enable-eri2=1 \ |
| 41 |
--enable-eri3=1 \ |
| 42 |
--with-max-am=${LMAXscip-debian debian libint2 2.7.2-1.2 libint2/rules/LMAX.} \ |
| 43 |
--with-eri-max-am=${LMAXscip-debian debian libint2 2.7.2-1.2 libint2/rules/LMAX.},$$(( $(LMAXscip-debian debian libint2 2.7.2-1.2 libint2/rules/LMAX.)-1)) \ |
| 44 |
--with-eri2-max-am=$$(($(LMAXscip-debian debian libint2 2.7.2-1.2 libint2/rules/LMAX.)+2)),$$(($(LMAXscip-debian debian libint2 2.7.2-1.2 libint2/rules/LMAX.)+1)) \ |
| 45 |
--with-eri3-max-am=$$(($(LMAXscip-debian debian libint2 2.7.2-1.2 libint2/rules/LMAX.)+2)),$$(($(LMAXscip-debian debian libint2 2.7.2-1.2 libint2/rules/LMAX.)+1)) \ |
| 46 |
--with-opt-am=3 \ |
| 47 |
--enable-generic-code \ |
| 48 |
--disable-unrolling |
| 49 |
$(MAKEscip-debian debian libint2 2.7.2-1.2 libint2/rules/MAKE.) -j4 export |
| 50 |
rm -rf sourcedir |
| 51 |
tar xf libint-$(UPSTREAM_VERSIONscip-debian debian libint2 2.7.2-1.2 libint2/rules/UPSTREAM_VERSION.).tgz |
| 52 |
mv libint-$(UPSTREAM_VERSIONscip-debian debian libint2 2.7.2-1.2 libint2/rules/UPSTREAM_VERSION.) sourcedir |
| 53 |
ifeq ($(DEB_BUILD_ARCH_BITSscip-debian debian libint2 2.7.2-1.2 libint2/rules/DEB_BUILD_ARCH_BITS.), 32) |
| 54 |
(cd sourcedir && patch -p2 < ../debian//patches/fix_generated_source_for_32bit_builds.patch) |
| 55 |
endif |
| 56 |
|
| 57 |
override_dh_autoreconfscip-debian debian libint2 2.7.2-1.2 libint2/rules/override_dh_autoreconf().: |
| 58 |
dh_autoreconfscip-debian debian debhelper . dh_autoreconf(). ./autogen.sh |
| 59 |
|
| 60 |
override_dh_auto_installscip-debian debian libint2 2.7.2-1.2 libint2/rules/override_dh_auto_install().: |
| 61 |
dh_auto_installscip-debian debian debhelper . dh_auto_install(). |
| 62 |
|
| 63 |
|
| 64 |
mkdir -p debian/tmp/usr/lib/$(DEB_HOST_MULTIARCHscip-debian debian libint2 2.7.2-1.2 libint2/rules/DEB_HOST_MULTIARCH.)/pkgconfig |
| 65 |
cp $(CURDIRscip-debian debian libint2 2.7.2-1.2 libint2/rules/CURDIR.)/libint2.pc debian/tmp/usr/lib/$(DEB_HOST_MULTIARCHscip-debian debian libint2 2.7.2-1.2 libint2/rules/DEB_HOST_MULTIARCH.)/pkgconfig |
| 66 |
|
| 67 |
override_dh_auto_cleanscip-debian debian libint2 2.7.2-1.2 libint2/rules/override_dh_auto_clean().: |
| 68 |
dh_auto_cleanscip-debian debian debhelper . dh_auto_clean(). --sourcedir=$(CURDIRscip-debian debian libint2 2.7.2-1.2 libint2/rules/CURDIR.) |
| 69 |
rm -f include/libint2/basis.h include/libint2/config.h src/lib/libint/MakeVars.features tests/MakeVars |
| 70 |
rm -rf sourcedir libint-$(UPSTREAM_VERSIONscip-debian debian libint2 2.7.2-1.2 libint2/rules/UPSTREAM_VERSION.).tgz |
| 71 |
|
| 72 |
override_dh_auto_testscip-debian debian libint2 2.7.2-1.2 libint2/rules/override_dh_auto_test().: |
| 73 |
-dh_auto_testscip-debian debian debhelper . dh_auto_test(). |