[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#994757: libgraphite2-dev: no archive files for static compilation are included in the -dev package



Package: libgraphite2-dev
Version: 1.3.13-11build1
Severity: normal
Tags: patch

Dear Maintainer,

There is no libgraphite2.a file, so it is not possible to compile statically
against this library. See attached patch to solve this.



-- System Information:
Debian Release: bullseye/sid
  APT prefers focal-updates
  APT policy: (500, 'focal-updates'), (500, 'focal-security'), (500, 'focal'), (100, 'focal-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.4.0-84-generic (SMP w/8 CPU cores)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=es_ES.UTF-8, LC_CTYPE=es_ES.UTF-8 (charmap=UTF-8), LANGUAGE=es_ES.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages libgraphite2-dev depends on:
ii  libgraphite2-3  1.3.13-11build1

libgraphite2-dev recommends no packages.

Versions of packages libgraphite2-dev suggests:
pn  libgraphite2-utils  <none>

-- no debconf information
diff -Nru graphite2-1.3.14/debian/changelog graphite2-1.3.14/debian/changelog
--- graphite2-1.3.14/debian/changelog	2020-04-01 11:11:00.000000000 +0200
+++ graphite2-1.3.14/debian/changelog	2021-09-17 17:11:16.000000000 +0200
@@ -1,3 +1,9 @@
+graphite2 (1.3.14-2) unstable; urgency=medium
+
+  * Build also archive for static compilation
+
+ -- Alfonso Sanchez-Beato (email Canonical) <alfonso.sanchez-beato@canonical.com>  Fri, 17 Sep 2021 17:11:16 +0200
+
 graphite2 (1.3.14-1) unstable; urgency=medium
 
   * New upstream version 1.3.14
diff -Nru graphite2-1.3.14/debian/libgraphite2-dev.install graphite2-1.3.14/debian/libgraphite2-dev.install
--- graphite2-1.3.14/debian/libgraphite2-dev.install	2020-04-01 11:11:00.000000000 +0200
+++ graphite2-1.3.14/debian/libgraphite2-dev.install	2021-09-17 17:09:42.000000000 +0200
@@ -1,3 +1,4 @@
 usr/include
+usr/lib/*/lib*.a
 usr/lib/*/lib*.so
 usr/lib/*/pkgconfig
diff -Nru graphite2-1.3.14/debian/rules graphite2-1.3.14/debian/rules
--- graphite2-1.3.14/debian/rules	2020-04-01 10:51:17.000000000 +0200
+++ graphite2-1.3.14/debian/rules	2021-09-17 17:10:55.000000000 +0200
@@ -2,9 +2,17 @@
 
 export DPKG_EXPORT_BUILDFLAGS = 0
 include /usr/share/dpkg/architecture.mk
+build = build
+build_static = build-static
 
 %:
-	dh $@ --with python3 --buildsystem=cmake --builddirectory=build
+	dh $@ --with python3 --buildsystem=cmake --builddirectory=${build}
+
+override_dh_auto_build-arch:
+	dh_auto_build -O--buildsystem=cmake \
+		-Nlibgraphite2-doc -Npython3-graphite2
+	dh_auto_build -O--buildsystem=cmake -O--builddirectory=${build_static} \
+		-Nlibgraphite2-doc -Npython3-graphite2
 
 override_dh_auto_build-indep:
 	@echo "Building docs"
@@ -12,6 +20,7 @@
 
 override_dh_auto_install-arch:
 	dh_auto_install -a
+	dh_auto_install --builddirectory=${build_static} -a
 
 override_dh_auto_install-indep:
 
@@ -20,9 +29,9 @@
 		python$$v setup.py -v install --prefix=/usr --root=$(CURDIR)/debian/python3-graphite2; \
 	done
 
-override_dh_auto_test: export LD_LIBRARY_PATH := $(CURDIR)/build/src
+override_dh_auto_test: export LD_LIBRARY_PATH := $(CURDIR)/${build}/src
 override_dh_auto_test:
-	set -e; if [ -f ./build/src/libgraphite2.so.3 ]; then \
+	set -e; if [ -f ./${build}/src/libgraphite2.so.3 ]; then \
 		dh_auto_test; \
 	fi
 
@@ -33,9 +42,11 @@
 	rm -rf tests/__pycache__
 	rm -rf python/graphite2/__pycache__
 	rm -rf python/graphite2.egg-info
+	dh_auto_clean --builddirectory=${build_static}
 	dh_auto_clean
 
 override_dh_auto_configure:
 	dh_auto_configure -- -DCMAKE_BUILD_TYPE:STRING=Release -DGRAPHITE2_NTRACING:BOOL=ON -DLIB_SUFFIX=/$(DEB_HOST_MULTIARCH) -DPYTHON_EXECUTABLE=$(shell which python3)
+	dh_auto_configure --builddirectory=${build_static} -- -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE:STRING=Release -DGRAPHITE2_NTRACING:BOOL=ON -DLIB_SUFFIX=/$(DEB_HOST_MULTIARCH) -DPYTHON_EXECUTABLE=$(shell which python3)
 	find . -type f ! -name "rules" ! -name "changelog" \
 		-exec sed -i -e 's/\-O3//g' {} \;


Reply to: