From 652593bc2c35ab495bf81edfd6a856a3e3a30b47263a2962e0bdb720171416d1 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 18 Jul 2016 08:18:37 +0000 Subject: [PATCH] Accepting request 408605 from home:jengelh:branches:devel:libraries:c_c++ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add libsass-am.diff, libsass-vers.diff to do proper versioning on shared library. - Drop useless with-pic (only for — unbuilt — static libs) OBS-URL: https://build.opensuse.org/request/show/408605 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libsass?expand=0&rev=7 --- libsass-am.diff | 43 +++++++++++++++++++++++++++++++++++++++++++ libsass-vers.diff | 38 ++++++++++++++++++++++++++++++++++++++ libsass.changes | 7 +++++++ libsass.spec | 39 +++++++++++++++++++-------------------- 4 files changed, 107 insertions(+), 20 deletions(-) create mode 100644 libsass-am.diff create mode 100644 libsass-vers.diff diff --git a/libsass-am.diff b/libsass-am.diff new file mode 100644 index 0000000..0bb48b2 --- /dev/null +++ b/libsass-am.diff @@ -0,0 +1,43 @@ +From: Jan Engelhardt +Date: 2016-06-30 13:18:23.962908776 +0200 + +build: resolve autoreconf warnings + +GNUmakefile.am:33: warning: compiling 'sassc.c' with per-target flags requires 'AM_PROG_CC_C_O' in 'configure.ac' +/usr/share/automake-1.13/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac' + +Adding AM_PROG_CC_C_O also requires that no AC_PROG_CC follows it. +Remove the duplicated test, then. + +--- + configure.ac | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +Index: libsass-3.3.2/configure.ac +=================================================================== +--- libsass-3.3.2.orig/configure.ac ++++ libsass-3.3.2/configure.ac +@@ -18,6 +18,7 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_R + + # Checks for programs. + AC_PROG_CC ++AM_PROG_CC_C_O + AC_PROG_CXX + AC_LANG_PUSH([C]) + AC_LANG_PUSH([C++]) +@@ -30,6 +31,7 @@ if test "x$is_mingw32" != "xyes"; then + AC_CHECK_TOOL([DLLWRAP], [dllwrap], [false]) + AC_CHECK_TOOL([WINDRES], [windres], [false]) + fi ++m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) + LT_INIT([dlopen]) + + # Checks for header files. +@@ -58,7 +60,6 @@ if test "x$is_mingw32" != "xyes"; then + fi + + if test "x$enable_tests" = "xyes"; then +- AC_PROG_CC + AC_PROG_AWK + # test need minitest gem + AC_PATH_PROG(RUBY, [ruby]) diff --git a/libsass-vers.diff b/libsass-vers.diff new file mode 100644 index 0000000..f6e0fcd --- /dev/null +++ b/libsass-vers.diff @@ -0,0 +1,38 @@ +From: Jan Engelhardt +Date: 2016-06-30 13:50:19.632475047 +0200 + +The documentation has the phrase + +"The API is not yet 100% stable, so we do not yet guarantee ABI +forward compatibility. We will do so, once we increase the shared +library version above 1.0." + +[Wrong premise. On the technical level, API/ABI stability does not +need to be guaranteed at all, nor is there a requirement that it has +to happen/start at a particular time, nor at a particular version +like "1.0". + +What you MUST do is that *if* the ABI/API changes, change +the SONAME.] + +Add -release to address +https://en.opensuse.org/openSUSE:Shared_library_packaging_policy#When_there_is_no_versioning +point 3. [until libsass 1.0, then reevaluate] + +--- + src/GNUmakefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: libsass-3.3.2/src/GNUmakefile.am +=================================================================== +--- libsass-3.3.2.orig/src/GNUmakefile.am ++++ libsass-3.3.2/src/GNUmakefile.am +@@ -34,7 +34,7 @@ include $(top_srcdir)/Makefile.conf + + libsass_la_SOURCES = ${CSOURCES} ${SOURCES} + +-libsass_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined -version-info 0:9:0 ++libsass_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined -version-info 0:9:0 -release ${PACKAGE_VERSION} + + if ENABLE_TESTS + if ENABLE_COVERAGE diff --git a/libsass.changes b/libsass.changes index cdec5cb..d6c510d 100644 --- a/libsass.changes +++ b/libsass.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Jul 15 01:26:38 UTC 2016 - jengelh@inai.de + +- Add libsass-am.diff, libsass-vers.diff to do proper versioning on + shared library. +- Drop useless with-pic (only for — unbuilt — static libs) + ------------------------------------------------------------------- Wed Jul 13 07:38:21 UTC 2016 - psimons@suse.com diff --git a/libsass.spec b/libsass.spec index e8b6cdc..d8b162a 100644 --- a/libsass.spec +++ b/libsass.spec @@ -16,7 +16,7 @@ # -%define libname libsass0 +%define libname libsass-3_3_2-0 Name: libsass Version: 3.3.2 Release: 0 @@ -24,7 +24,10 @@ Summary: C/C++ Sass compiler library License: MIT Group: Development/Libraries/C and C++ Url: https://github.com/sass/libsass -Source: %{name}-%{version}.tar.gz +Source: https://github.com/sass/libsass/archive/3.3.2.tar.gz#/%name-%version.tar.gz +Patch1: libsass-am.diff +Patch2: libsass-vers.diff +BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: autoconf BuildRequires: automake BuildRequires: gcc-c++ @@ -33,13 +36,8 @@ BuildRequires: pkgconfig BuildRoot: %{_tmppath}/%{name}-%{version}-build %description -Sass is a CSS pre-processor language to add on exciting, new, awesome -features to CSS. LibSass is a C/C++ port of the Sass CSS precompiler. -The original version was written in Ruby, but this version is meant -for efficiency and portability. - -This library strives to be light, simple, and easy to build and integrate -with a variety of platforms and languages. +Sass is a CSS pre-processor language to add new features to CSS. +LibSass is a C/C++ port of the Sass CSS precompiler. %package -n %{libname} Summary: Library shared object of libsass @@ -58,34 +56,35 @@ This package provides development header files for libsass %prep %setup -q +%patch -P 1 -P 2 -p1 %build +if [ ! -f VERSION ]; then + echo "%{version}" >VERSION +fi autoreconf -fi -%configure --with-pic --disable-static +%configure --disable-static make %{?_smp_mflags} %check make check %{?_smp_mflags} +%install +%make_install +find "%{buildroot}" -type f -name "*.la" -delete + %post -n %{libname} -p /sbin/ldconfig %postun -n %{libname} -p /sbin/ldconfig -%install -make %{?_smp_mflags} DESTDIR=%{buildroot} install -rm %{buildroot}/%{_libdir}/libsass.la - %files -n %{libname} %defattr(-,root,root) %doc LICENSE -%{_libdir}/libsass.so.* +%{_libdir}/libsass*.so.* %files devel %defattr(-,root,root) -%dir %{_includedir}/sass -%{_includedir}/sass/*.h -%{_includedir}/sass.h -%{_includedir}/sass2scss.h +%{_includedir}/sass* %{_libdir}/pkgconfig/libsass.pc -%{_libdir}/libsass.so +%{_libdir}/libsass*.so %changelog