From 058f1c62cbb9c55b2b41b4a7ee89275d51c473b4ac8694939d5e513bb058d907 Mon Sep 17 00:00:00 2001 From: Kristyna Streitova Date: Mon, 7 Jun 2021 15:31:05 +0000 Subject: [PATCH] Accepting request 898048 from home:jengelh:pic - Drop --with-pic (no effect with --disable-static) OBS-URL: https://build.opensuse.org/request/show/898048 OBS-URL: https://build.opensuse.org/package/show/Archiving/bzip2?expand=0&rev=83 --- bzip2-1.0.6.2-autoconfiscated.patch | 300 +++++++++++++++------------- bzip2.changes | 6 + bzip2.spec | 24 +-- 3 files changed, 178 insertions(+), 152 deletions(-) diff --git a/bzip2-1.0.6.2-autoconfiscated.patch b/bzip2-1.0.6.2-autoconfiscated.patch index 78a0445..cad6ba0 100644 --- a/bzip2-1.0.6.2-autoconfiscated.patch +++ b/bzip2-1.0.6.2-autoconfiscated.patch @@ -1,125 +1,17 @@ +--- + Makefile.am | 137 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ + README.autotools | 41 ++++++++++++++++ + autogen.sh | 8 +++ + bzip2.pc.in | 11 ++++ + bzlib.h | 4 + + configure.ac | 62 ++++++++++++++++++++++++ + m4/visibility.m4 | 78 +++++++++++++++++++++++++++++++ + 7 files changed, 340 insertions(+), 1 deletion(-) + +Index: bzip2-1.0.8/Makefile.am +=================================================================== --- /dev/null -+++ autogen.sh -@@ -0,0 +1,8 @@ -+mv LICENSE COPYING -+mv CHANGES NEWS -+touch AUTHORS -+touch ChangeLog -+libtoolize --force -+aclocal -+automake --add-missing --gnu -+autoconf ---- /dev/null -+++ README.autotools -@@ -0,0 +1,41 @@ -+bzip2 autoconfiscated -+===================== -+ -+Temporarily at http://ftp.suse.com/pub/people/sbrabec/bzip2/ expecting -+that it will become a new upstream version to prevent per-distribution -+shared library patching done by nearly each Linux vendor separately. -+ -+Autoconfiscation brings standard ./configure ; make ; make install -+installation, seamless support of DESTDIR, automatic check for supported -+CFLAGS, standard shared library support, automatic large files CFLAGS -+check and all things that are supported by automake. -+ -+It makes obsolete Makefile-libbz2_so and README.COMPILATION.PROBLEMS. -+Now configure should automatically detect correct build flags. -+ -+In case of any problem or question with autotools support feel free to -+contact me: Stanislav Brabec -+ -+Autoconfiscated version binaries are exactly equal to -+bzip2-1.0.6.tar.gz. There are only few changes. See below. -+ -+ -+New features: -+ -+Trivial link man pages for bzcat and bunzip2 added. -+ -+bzip2.pc file for pkg-config. Packages can use it for checks. -+ -+ -+Incompatible changes: -+ -+soname change. Libtool has no support for two parts soname suffix (e. g. -+libbz2.so.1.0). It must be a single number (e. g. libbz2.so.1). That is -+why soname must change. But I see not a big problem with it. Several -+distributions already use the new number instead of the non-standard -+number from Makefile-libbz2_so. -+ -+Shared library exports only public symbols. -+ -+To be super-safe, I incremented minor number of the library file, so -+both instances of the shared library can live together. ---- /dev/null -+++ configure.ac -@@ -0,0 +1,62 @@ -+# -*- Autoconf -*- -+# Process this file with autoconf to produce a configure script. -+ -+AC_PREREQ([2.57]) -+AC_INIT([bzip2], [1.0.8], [Julian Seward ]) -+BZIP2_LT_CURRENT=1 -+BZIP2_LT_REVISION=6 -+BZIP2_LT_AGE=0 -+AC_CONFIG_SRCDIR([bzlib.h]) -+AC_CONFIG_MACRO_DIR([m4]) -+ -+AM_INIT_AUTOMAKE([foreign subdir-objects]) -+AM_MAINTAINER_MODE -+ -+# Checks for programs. -+AC_PROG_AWK -+AC_PROG_CC_STDC -+AC_PROG_CC_C_O -+AC_USE_SYSTEM_EXTENSIONS -+AC_PROG_INSTALL -+AC_PROG_LN_S -+AC_PROG_MAKE_SET -+LT_INIT([disable-static pic-only]) -+PKG_PROG_PKG_CONFIG -+gl_VISIBILITY -+# Checks for libraries. -+ -+# Checks for header files. -+ -+# Checks for typedefs, structures, and compiler characteristics. -+ -+# Check for system features. -+AC_SYS_LARGEFILE -+ -+AC_MSG_CHECKING([whether compiler understands -Wall]) -+save_CFLAGS="$CFLAGS" -+CFLAGS="$CFLAGS -Wall" -+AC_TRY_COMPILE([], [], [ -+ AC_MSG_RESULT([yes]) -+], [ -+ AC_MSG_RESULT([no]) -+ CFLAGS="$save_CFLAGS" -+]) -+ -+AC_MSG_CHECKING([whether compiler understands -Winline]) -+save_CFLAGS="$CFLAGS" -+CFLAGS="$CFLAGS -Winline" -+AC_TRY_COMPILE([], [], [ -+ AC_MSG_RESULT([yes]) -+], [ -+ AC_MSG_RESULT([no]) -+ CFLAGS="$save_CFLAGS" -+]) -+ -+# Checks for library functions. -+ -+# Write the output. -+AC_SUBST([BZIP2_LT_CURRENT]) -+AC_SUBST([BZIP2_LT_REVISION]) -+AC_SUBST([BZIP2_LT_AGE]) -+AC_CONFIG_FILES([Makefile bzip2.pc]) -+AC_OUTPUT ---- /dev/null -+++ Makefile.am ++++ bzip2-1.0.8/Makefile.am @@ -0,0 +1,137 @@ +ACLOCAL_AMFLAGS = -I m4 +lib_LTLIBRARIES = libbz2.la @@ -258,8 +150,69 @@ + words2 \ + words3 \ + xmlproc.sh +Index: bzip2-1.0.8/README.autotools +=================================================================== --- /dev/null -+++ bzip2.pc.in ++++ bzip2-1.0.8/README.autotools +@@ -0,0 +1,41 @@ ++bzip2 autoconfiscated ++===================== ++ ++Temporarily at http://ftp.suse.com/pub/people/sbrabec/bzip2/ expecting ++that it will become a new upstream version to prevent per-distribution ++shared library patching done by nearly each Linux vendor separately. ++ ++Autoconfiscation brings standard ./configure ; make ; make install ++installation, seamless support of DESTDIR, automatic check for supported ++CFLAGS, standard shared library support, automatic large files CFLAGS ++check and all things that are supported by automake. ++ ++It makes obsolete Makefile-libbz2_so and README.COMPILATION.PROBLEMS. ++Now configure should automatically detect correct build flags. ++ ++In case of any problem or question with autotools support feel free to ++contact me: Stanislav Brabec ++ ++Autoconfiscated version binaries are exactly equal to ++bzip2-1.0.6.tar.gz. There are only few changes. See below. ++ ++ ++New features: ++ ++Trivial link man pages for bzcat and bunzip2 added. ++ ++bzip2.pc file for pkg-config. Packages can use it for checks. ++ ++ ++Incompatible changes: ++ ++soname change. Libtool has no support for two parts soname suffix (e. g. ++libbz2.so.1.0). It must be a single number (e. g. libbz2.so.1). That is ++why soname must change. But I see not a big problem with it. Several ++distributions already use the new number instead of the non-standard ++number from Makefile-libbz2_so. ++ ++Shared library exports only public symbols. ++ ++To be super-safe, I incremented minor number of the library file, so ++both instances of the shared library can live together. +Index: bzip2-1.0.8/autogen.sh +=================================================================== +--- /dev/null ++++ bzip2-1.0.8/autogen.sh +@@ -0,0 +1,8 @@ ++mv LICENSE COPYING ++mv CHANGES NEWS ++touch AUTHORS ++touch ChangeLog ++libtoolize --force ++aclocal ++automake --add-missing --gnu ++autoconf +Index: bzip2-1.0.8/bzip2.pc.in +=================================================================== +--- /dev/null ++++ bzip2-1.0.8/bzip2.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ @@ -272,8 +225,94 @@ +Version: @VERSION@ +Libs: -L${libdir} -lbz2 +Cflags: -I${includedir} +Index: bzip2-1.0.8/bzlib.h +=================================================================== +--- bzip2-1.0.8.orig/bzlib.h ++++ bzip2-1.0.8/bzlib.h +@@ -91,9 +91,11 @@ typedef + # endif + #else + # define BZ_API(func) func +-# define BZ_EXTERN extern + #endif + ++#ifndef BZ_EXTERN ++#define BZ_EXTERN extern ++#endif + + /*-- Core (low-level) library functions --*/ + +Index: bzip2-1.0.8/configure.ac +=================================================================== --- /dev/null -+++ m4/visibility.m4 ++++ bzip2-1.0.8/configure.ac +@@ -0,0 +1,62 @@ ++# -*- Autoconf -*- ++# Process this file with autoconf to produce a configure script. ++ ++AC_PREREQ([2.57]) ++AC_INIT([bzip2], [1.0.8], [Julian Seward ]) ++BZIP2_LT_CURRENT=1 ++BZIP2_LT_REVISION=6 ++BZIP2_LT_AGE=0 ++AC_CONFIG_SRCDIR([bzlib.h]) ++AC_CONFIG_MACRO_DIR([m4]) ++ ++AM_INIT_AUTOMAKE([foreign subdir-objects]) ++AM_MAINTAINER_MODE ++ ++# Checks for programs. ++AC_PROG_AWK ++AC_PROG_CC_STDC ++AC_PROG_CC_C_O ++AC_USE_SYSTEM_EXTENSIONS ++AC_PROG_INSTALL ++AC_PROG_LN_S ++AC_PROG_MAKE_SET ++LT_INIT([disable-static pic-only]) ++PKG_PROG_PKG_CONFIG ++gl_VISIBILITY ++# Checks for libraries. ++ ++# Checks for header files. ++ ++# Checks for typedefs, structures, and compiler characteristics. ++ ++# Check for system features. ++AC_SYS_LARGEFILE ++ ++AC_MSG_CHECKING([whether compiler understands -Wall]) ++save_CFLAGS="$CFLAGS" ++CFLAGS="$CFLAGS -Wall" ++AC_TRY_COMPILE([], [], [ ++ AC_MSG_RESULT([yes]) ++], [ ++ AC_MSG_RESULT([no]) ++ CFLAGS="$save_CFLAGS" ++]) ++ ++AC_MSG_CHECKING([whether compiler understands -Winline]) ++save_CFLAGS="$CFLAGS" ++CFLAGS="$CFLAGS -Winline" ++AC_TRY_COMPILE([], [], [ ++ AC_MSG_RESULT([yes]) ++], [ ++ AC_MSG_RESULT([no]) ++ CFLAGS="$save_CFLAGS" ++]) ++ ++# Checks for library functions. ++ ++# Write the output. ++AC_SUBST([BZIP2_LT_CURRENT]) ++AC_SUBST([BZIP2_LT_REVISION]) ++AC_SUBST([BZIP2_LT_AGE]) ++AC_CONFIG_FILES([Makefile bzip2.pc]) ++AC_OUTPUT +Index: bzip2-1.0.8/m4/visibility.m4 +=================================================================== +--- /dev/null ++++ bzip2-1.0.8/m4/visibility.m4 @@ -0,0 +1,78 @@ +# visibility.m4 serial 4 (gettext-0.18.2) +dnl Copyright (C) 2005, 2008, 2010-2011 Free Software Foundation, Inc. @@ -353,18 +392,3 @@ + AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY], + [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.]) +]) ---- bzlib.h.orig -+++ bzlib.h -@@ -91,9 +91,11 @@ typedef - # endif - #else - # define BZ_API(func) func --# define BZ_EXTERN extern - #endif - -+#ifndef BZ_EXTERN -+#define BZ_EXTERN extern -+#endif - - /*-- Core (low-level) library functions --*/ - diff --git a/bzip2.changes b/bzip2.changes index e1611ab..9a40c46 100644 --- a/bzip2.changes +++ b/bzip2.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jun 7 11:28:44 UTC 2021 - Jan Engelhardt + +- Drop --with-pic (no effect with --disable-static) +- Use %autosetup (rediff bzip2-1.0.6.2-autoconfiscated.patch to p1) + ------------------------------------------------------------------- Wed Oct 30 10:05:31 UTC 2019 - Arjen de Korte diff --git a/bzip2.spec b/bzip2.spec index 58feaaf..238312f 100644 --- a/bzip2.spec +++ b/bzip2.spec @@ -1,7 +1,7 @@ # # spec file for package bzip2 # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -43,11 +43,11 @@ Provides: bzip = %{version} Obsoletes: bzip < %{version} %description -The bzip2 program is a very powerful program for compressing files. +The bzip2 program is a program for compressing files. %package doc Summary: The bzip2 program and Library Documentation -Group: Productivity/Archiving/Compression +Group: Documentation/Other BuildArch: noarch %description doc @@ -70,23 +70,19 @@ Requires: glibc-devel The bzip2 runtime library development files. %prep -%setup -q -%patch0 -%patch3 -p1 -%patch4 -p1 +%autosetup -p1 %build autoreconf -fiv %configure \ - --with-pic \ --disable-static %if 0%{?do_profiling} - make %{?_smp_mflags} CFLAGS="%{optflags} %{cflags_profile_generate}" - make %{?_smp_mflags} CFLAGS="%{optflags} %{cflags_profile_generate}" test - make %{?_smp_mflags} clean - make %{?_smp_mflags} CFLAGS="%{optflags} %{cflags_profile_feedback}" + %make_build CFLAGS="%{optflags} %{cflags_profile_generate}" + %make_build CFLAGS="%{optflags} %{cflags_profile_generate}" test + %make_build clean + %make_build CFLAGS="%{optflags} %{cflags_profile_feedback}" %else - make %{?_smp_mflags} CFLAGS="%{optflags}" + %make_build CFLAGS="%{optflags}" %endif %install @@ -106,7 +102,7 @@ find %{buildroot} -type f -name "*.la" -delete -print %postun -n %{libname} -p /sbin/ldconfig %check -make %{?_smp_mflags} test +%make_build test %files %{_bindir}/bunzip2