From 3e6c133b463a43976ca9fd1ae9918d4eee97ccb3 Mon Sep 17 00:00:00 2001 From: James Antill Date: Feb 10 2008 22:52:24 +0000 Subject: - Add upstream multilib patch for ustr-import - Resolves: bug#343351 --- diff --git a/ustr-import-multilib.patch b/ustr-import-multilib.patch new file mode 100644 index 0000000..3698755 --- /dev/null +++ b/ustr-import-multilib.patch @@ -0,0 +1,70 @@ +commit 563a3515334f69d1d071716ee99280cd221c2800 +Author: James Antill +Date: Sun Feb 10 16:52:04 2008 -0500 + + Make ustr-import multilib. aware + +diff --git a/Makefile b/Makefile +index d2f9a16..2158dff 100644 +--- a/Makefile ++++ b/Makefile +@@ -12,12 +12,14 @@ DESTDIR = + prefix=/usr + datadir=$(prefix)/share + libdir=$(prefix)/lib ++libexecdir=$(prefix)/libexec + bindir=$(prefix)/bin + includedir=$(prefix)/include + SHRDIR=$(datadir)/ustr-$(VERS_FULL) + DOCSHRDIR=$(datadir)/doc/ustr-devel-$(VERS_FULL) +-EXAMDIR=$(datadir)/ustr-$(VERS_FULL)/examples ++EXAMDIR=$(SHRDIR)/examples + mandir=$(datadir)/doc/man ++MBINDIR=$(libexecdir)/ustr-$(VERS_FULL) + + ############################################################################### + # This is here to work around the "Fedora build system requirement" that a big +@@ -397,16 +399,23 @@ install: all-shared ustr.pc ustr-debug.pc + install -m 755 -t $(DESTDIR)$(bindir) ustr-import + install -m 644 -t $(DESTDIR)$(libdir)/pkgconfig ustr.pc ustr-debug.pc + +-install-multilib-linux: install autoconf_64b +- install -m 644 -t $(DESTDIR)$(includedir) $(SRC_HDRS_MULTI_LIB) ++ustr-import-multilib: ustr-import-multilib.in ++ sed -e 's,@MBINDIR@,$(MBINDIR),g' < $< > $@ ++ ++install-multilib-linux: install autoconf_64b ustr-import-multilib + $(HIDE)mlib=`./autoconf_64b`; \ + if test "x$$mlib" = "x1"; then mlib=64; else mlib=32; fi; \ + mv -f $(DESTDIR)$(includedir)/ustr-conf-debug.h \ + $(DESTDIR)$(includedir)/ustr-conf-debug-$$mlib.h; \ + mv -f $(DESTDIR)$(includedir)/ustr-conf.h \ + $(DESTDIR)$(includedir)/ustr-conf-$$mlib.h ++ mv -f $(DESTDIR)$(bindir)/ustr-import \ ++ $(DESTDIR)$(MBINDIR)/ustr-import-$$mlib ++ install -m 644 -t $(DESTDIR)$(includedir) $(SRC_HDRS_MULTI_LIB) + $(HIDE)mv -f $(DESTDIR)$(includedir)/ustr-conf-debug-multilib-linux.h $(DESTDIR)$(includedir)/ustr-conf-debug.h + $(HIDE)mv -f $(DESTDIR)$(includedir)/ustr-conf-multilib-linux.h $(DESTDIR)$(includedir)/ustr-conf.h ++ install -m 755 -t $(DESTDIR)$(bindir) ustr-import-multilib ++ $(HIDE)mv -f $(DESTDIR)$(bindir)/ustr-import-multilib $(DESTDIR)$(bindir)/ustr-import + + + clean: +diff --git a/ustr-import-multilib.in b/ustr-import-multilib.in +new file mode 100644 +index 0000000..2998230 +--- /dev/null ++++ b/ustr-import-multilib.in +@@ -0,0 +1,12 @@ ++#! /bin/sh -e ++ ++MBINDIR=@MBINDIR@ ++ ++one=64 ++two=32 ++ ++if [ -f "$MBINDIR/ustr-import-$one" ]; then ++ exec "$MBINDIR/ustr-import-$one" "$@" ++fi ++ ++exec "$MBINDIR/ustr-import-$two" "$@" diff --git a/ustr-import-multilib2.patch b/ustr-import-multilib2.patch index f9fdf28..8f7b1b1 100644 --- a/ustr-import-multilib2.patch +++ b/ustr-import-multilib2.patch @@ -1,14 +1,20 @@ -commit 31320e203e31e78f3114c2e09c044bfd5f96fc00 +commit 4d5d688defa0f0909fb05e1e288f9ffbbb050e7d Author: James Antill Date: Sun Feb 10 17:46:10 2008 -0500 - Fix typo + Fix minor problems diff --git a/Makefile b/Makefile -index 2158dff..080c7de 100644 +index 2158dff..17558cf 100644 --- a/Makefile +++ b/Makefile -@@ -408,7 +408,7 @@ install-multilib-linux: install autoconf_64b ustr-import-multilib +@@ -403,12 +403,13 @@ ustr-import-multilib: ustr-import-multilib.in + sed -e 's,@MBINDIR@,$(MBINDIR),g' < $< > $@ + + install-multilib-linux: install autoconf_64b ustr-import-multilib ++ install -d $(DESTDIR)$(MBINDIR) + $(HIDE)mlib=`./autoconf_64b`; \ + if test "x$$mlib" = "x1"; then mlib=64; else mlib=32; fi; \ mv -f $(DESTDIR)$(includedir)/ustr-conf-debug.h \ $(DESTDIR)$(includedir)/ustr-conf-debug-$$mlib.h; \ mv -f $(DESTDIR)$(includedir)/ustr-conf.h \ diff --git a/ustr.spec b/ustr.spec index 47aab15..19103e1 100644 --- a/ustr.spec +++ b/ustr.spec @@ -34,6 +34,7 @@ License: MIT or LGPLv2+ or BSD URL: http://www.and.org/ustr/ Source0: http://www.and.org/ustr/%{version}/%{name}-%{version}.tar.gz Patch0: ustr-import-multilib.patch +Patch1: ustr-import-multilib2.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # BuildRequires: make gcc sed @@ -88,6 +89,7 @@ Requires: %{name}-debug = %{version}-%{release} %setup -q %patch0 -p1 +%patch1 -p1 %build make %{?_smp_mflags} all-shared CFLAGS="${CFLAGS:-%optflags}" %{policy_cflags}