Initial import of libidn2
This commit is contained in:
parent
cfe1e3359e
commit
6b3f076776
1
.gitignore
vendored
1
.gitignore
vendored
@ -0,0 +1 @@
|
|||||||
|
libidn2-0.3.tar.gz
|
87
libidn2-0.3-rpath.patch
Normal file
87
libidn2-0.3-rpath.patch
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
Patch by Robert Scheck <robert@fedoraproject.org> for libidn2 >= 0.3, which works
|
||||||
|
around the broken libtool of Debian. Multilib/multiarch systems like Fedora or Red
|
||||||
|
Hat Enterprise Linux are using /usr/lib64 for 64 bit libraries and /usr/lib is used
|
||||||
|
for 32 bit libraries. That allows to run 32 bit software on 64 bit systems. Debian
|
||||||
|
systems only use /usr/lib which contains only 32 or 64 bit systems depending on the
|
||||||
|
architecture.
|
||||||
|
|
||||||
|
Libtool hardcodes the runtime search path in a library (rpath), if the library that
|
||||||
|
is used for linking is not within the default system library path. The result is,
|
||||||
|
that if libtool.m4/configure files are generated by a Debian system, but used on a
|
||||||
|
Fedora or Red Hat Enterprise Linux 64 bit system for compiling, "-rpath /usr/lib64"
|
||||||
|
makes it into the binary.
|
||||||
|
|
||||||
|
Fedora and EPEL (for Red Hat Enterprise Linux) do not allow binaries with rpath, as
|
||||||
|
the Linux dynamic linker is usually smarter than the hardcoded path.
|
||||||
|
|
||||||
|
The fix for this issue is to add the optional /lib64 and /usr/lib64 directories at/
|
||||||
|
within libtool in front of the regular /lib and /usr/lib directories at the system
|
||||||
|
library path. These libtool information are hold in libtool.m4, which is generated
|
||||||
|
by running aclocal. As the content of libtool.m4 is included into configure during
|
||||||
|
a run of autoconf, libtool.m4 needs to be modified within the upstream build system
|
||||||
|
each time after a aclocal run - until Debian's libtool is fixed at Debian upstream.
|
||||||
|
|
||||||
|
Applying the fix is either possible by using the last hunk of the patch (the other
|
||||||
|
hunks are runtime-only if configure file has been already generated) or by running
|
||||||
|
the following sed command after each aclocal run within the upstream build system:
|
||||||
|
|
||||||
|
sed -e 's@\(# Append ld.so.conf contents to the search path\)@# Add ABI-specific directories to the system library path.\n sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"\n\n \1@' \
|
||||||
|
-e 's@/lib /usr/lib $lt_ld_extra@$sys_lib_dlsearch_path_spec $lt_ld_extra@' -i libidn2-0.3/m4/libtool.m4
|
||||||
|
|
||||||
|
More information regarding this topic can be found for example at:
|
||||||
|
|
||||||
|
- http://osdir.com/ml/bug-libtool-gnu/2009-12/msg00034.html
|
||||||
|
- http://lists.gnu.org/archive/html/libtool/2009-01/msg00039.html
|
||||||
|
- http://thread.gmane.org/gmane.comp.gnu.libtool.general/8339/focus=8345
|
||||||
|
|
||||||
|
--- libidn2-0.3/configure 2011-04-20 01:23:30.000000000 +0200
|
||||||
|
+++ libidn2-0.3/configure.rpath 2011-05-07 20:23:02.606829209 +0200
|
||||||
|
@@ -10703,10 +10703,13 @@
|
||||||
|
# before this can be enabled.
|
||||||
|
hardcode_into_libs=yes
|
||||||
|
|
||||||
|
+ # Add ABI-specific directories to the system library path.
|
||||||
|
+ sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
|
||||||
|
+
|
||||||
|
# Append ld.so.conf contents to the search path
|
||||||
|
if test -f /etc/ld.so.conf; then
|
||||||
|
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
|
||||||
|
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
|
||||||
|
+ sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# We used to test for /lib/ld.so.1 and disable shared libraries on
|
||||||
|
--- libidn2-0.3/src/configure 2011-04-20 01:23:54.000000000 +0200
|
||||||
|
+++ libidn2-0.3/src/configure.rpath 2011-05-07 20:24:25.959753622 +0200
|
||||||
|
@@ -10486,10 +10486,13 @@
|
||||||
|
# before this can be enabled.
|
||||||
|
hardcode_into_libs=yes
|
||||||
|
|
||||||
|
+ # Add ABI-specific directories to the system library path.
|
||||||
|
+ sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
|
||||||
|
+
|
||||||
|
# Append ld.so.conf contents to the search path
|
||||||
|
if test -f /etc/ld.so.conf; then
|
||||||
|
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
|
||||||
|
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
|
||||||
|
+ sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# We used to test for /lib/ld.so.1 and disable shared libraries on
|
||||||
|
--- libidn2-0.3/m4/libtool.m4 2011-04-20 01:23:26.000000000 +0200
|
||||||
|
+++ libidn2-0.3/m4/libtool.m4.rpath 2011-05-07 20:23:47.214717341 +0200
|
||||||
|
@@ -2474,10 +2474,13 @@
|
||||||
|
# before this can be enabled.
|
||||||
|
hardcode_into_libs=yes
|
||||||
|
|
||||||
|
+ # Add ABI-specific directories to the system library path.
|
||||||
|
+ sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
|
||||||
|
+
|
||||||
|
# Append ld.so.conf contents to the search path
|
||||||
|
if test -f /etc/ld.so.conf; then
|
||||||
|
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
|
||||||
|
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
|
||||||
|
+ sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# We used to test for /lib/ld.so.1 and disable shared libraries on
|
90
libidn2.spec
Normal file
90
libidn2.spec
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
Summary: Library to support IDNA2008 internationalized domain names
|
||||||
|
Name: libidn2
|
||||||
|
Version: 0.3
|
||||||
|
Release: 1%{?dist}
|
||||||
|
License: GPLv3+
|
||||||
|
Group: System Environment/Libraries
|
||||||
|
URL: http://www.josefsson.org/%{name}/
|
||||||
|
Source: http://www.josefsson.org/%{name}/releases/%{name}-%{version}.tar.gz
|
||||||
|
Patch0: libidn2-0.3-rpath.patch
|
||||||
|
Requires(post): /sbin/install-info, /sbin/ldconfig
|
||||||
|
Requires(preun): /sbin/install-info
|
||||||
|
Requires(postun): /sbin/ldconfig
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
|
%description
|
||||||
|
Libidn2 is an implementation of the IDNA2008 specifications in RFC
|
||||||
|
5890, 5891, 5892 and 5893 for internationalized domain names (IDN).
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: Development files for libidn2
|
||||||
|
Group: Development/Libraries
|
||||||
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
The libidn2-devel package contains libraries and header files for
|
||||||
|
developing applications that use libidn2.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q
|
||||||
|
%patch0 -p1 -b .rpath
|
||||||
|
touch -c -r m4/libtool.m4.rpath m4/libtool.m4
|
||||||
|
|
||||||
|
%build
|
||||||
|
%configure
|
||||||
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
|
%install
|
||||||
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
make DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p' install
|
||||||
|
|
||||||
|
# Clean-up examples for documentation
|
||||||
|
make %{?_smp_mflags} -C examples distclean
|
||||||
|
rm -f examples/Makefile*
|
||||||
|
|
||||||
|
# Don't install any static .a and libtool .la files
|
||||||
|
rm -f $RPM_BUILD_ROOT%{_libdir}/*.{a,la}
|
||||||
|
|
||||||
|
# Some file cleanups
|
||||||
|
rm -f $RPM_BUILD_ROOT%{_datadir}/info/dir
|
||||||
|
|
||||||
|
# Remove example-only binaries for now
|
||||||
|
rm -f $RPM_BUILD_ROOT%{_bindir}/{lookup,register}
|
||||||
|
|
||||||
|
%check
|
||||||
|
make %{?_smp_mflags} -C tests check
|
||||||
|
|
||||||
|
%post
|
||||||
|
/sbin/ldconfig
|
||||||
|
/sbin/install-info %{_infodir}/%{name}.info.gz %{_infodir}/dir || :
|
||||||
|
|
||||||
|
%preun
|
||||||
|
if [ $1 = 0 ]; then
|
||||||
|
/sbin/install-info --delete %{_infodir}/%{name}.info.gz %{_infodir}/dir || :
|
||||||
|
fi
|
||||||
|
|
||||||
|
%postun -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%clean
|
||||||
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%doc AUTHORS NEWS README
|
||||||
|
%{_bindir}/idn2
|
||||||
|
%{_mandir}/man1/idn2.1*
|
||||||
|
%{_libdir}/%{name}.so.*
|
||||||
|
%{_infodir}/%{name}.info*
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%doc doc/%{name}.html examples
|
||||||
|
%{_libdir}/%{name}.so
|
||||||
|
%{_includedir}/*.h
|
||||||
|
%{_mandir}/man3/*
|
||||||
|
%{_datadir}/gtk-doc/
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Sat May 07 2011 Robert Scheck <robert@fedoraproject.org> 0.3-1
|
||||||
|
- Upgrade to 0.3
|
||||||
|
- Initial spec file for Fedora and Red Hat Enterprise Linux
|
Loading…
Reference in New Issue
Block a user