Accepting request 408605 from home:jengelh:branches:devel:libraries:c_c++

- 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
This commit is contained in:
Dirk Mueller 2016-07-18 08:18:37 +00:00 committed by Git OBS Bridge
parent e7114bfcd7
commit 652593bc2c
4 changed files with 107 additions and 20 deletions

43
libsass-am.diff Normal file
View File

@ -0,0 +1,43 @@
From: Jan Engelhardt <jengelh@inai.de>
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])

38
libsass-vers.diff Normal file
View File

@ -0,0 +1,38 @@
From: Jan Engelhardt <jengelh@inai.de>
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

View File

@ -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

View File

@ -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