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

Bug#888705: abseil-cpp packaging



On Tue, May 19, 2020 at 6:28 PM Benjamin Barenblat <bbaren@debian.org> wrote:
> Okay, we’re all set. I’ve pushed my work to
> https://salsa.debian.org/debian/abseil, and both command-line linking
> and CMake integration work. Comments and suggestions are welcome – if I
> don’t hear anything in the next day or two, I’ll go ahead and upload to
> NEW.
 Please do build static libraries with the following patch. Even
Google projects link with static Abseil libraries and the project
itself also allow it[1]:
"ALLOWED: Distribute a static library built with an LTS branch of
Abseil. Because LTS branches use inline namespaces for all absl::
symbols, collisions between potential Abseil “versions” should not
occur, though your library may incur code bloat."

I do not want to push it without being a co-maintainer or without
discussion, but please do it yourself.

Thanks,
Laszlo/GCS
[1] https://abseil.io/about/releases
diff -Nru abseil-0~20200225.2/debian/libabsl-dev.install abseil-0~20200225.2/debian/libabsl-dev.install
--- abseil-0~20200225.2/debian/libabsl-dev.install	2020-05-12 22:16:31.000000000 +0000
+++ abseil-0~20200225.2/debian/libabsl-dev.install	2020-05-20 09:43:24.000000000 +0000
@@ -13,5 +13,6 @@
 # the License.
 
 usr/include/absl
+usr/lib/*/*.a
 usr/lib/*/*.so
 usr/lib/*/cmake
diff -Nru abseil-0~20200225.2/debian/rules abseil-0~20200225.2/debian/rules
--- abseil-0~20200225.2/debian/rules	2020-05-12 22:16:31.000000000 +0000
+++ abseil-0~20200225.2/debian/rules	2020-05-20 09:43:24.000000000 +0000
@@ -15,12 +15,24 @@
 
 export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow
 
-%:
-	dh $@
+override_dh_auto_clean:
+	$(RM) -r $(CURDIR)/shared
+	$(RM) -r $(CURDIR)/static
 
 override_dh_auto_configure:
-	dh_auto_configure -- -DCMAKE_CXX_STANDARD=14 -DBUILD_SHARED_LIBS=ON
+	dh_auto_configure -Bshared \
+		-- -DCMAKE_CXX_STANDARD=14 -DBUILD_SHARED_LIBS=ON
+	dh_auto_configure -Bstatic \
+		-- -DCMAKE_CXX_STANDARD=14 -DBUILD_SHARED_LIBS=OFF
+
+override_dh_auto_build:
+	dh_auto_build -Bshared
+	dh_auto_build -Bstatic
 
 override_dh_auto_install:
-	dh_auto_install
+	dh_auto_install -Bshared
+	dh_auto_install -Bstatic
 	find debian/tmp -type d -empty -delete
+
+%:
+	dh $@

Reply to: