Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=2898c573e89c2d575b65cf5775fa87d1fc2fddfd
commit 2898c573e89c2d575b65cf5775fa87d1fc2fddfd Author: James Buren <[email protected]> Date: Sat Nov 21 15:04:51 2015 +0100 lib32-0.3-1-x86_64 * drop binfmt. it's not needed afterall. a symbolic link will suffice. * favor using a profile script to set the necessary environment * variables. diff --git a/source/lib32-extra/lib32/FrugalBuild b/source/lib32-extra/lib32/FrugalBuild index bc2d4e1..11fdcbc 100644 --- a/source/lib32-extra/lib32/FrugalBuild +++ b/source/lib32-extra/lib32/FrugalBuild @@ -2,16 +2,16 @@ # Maintainer: James Buren <[email protected]> pkgname=lib32 -pkgver=0.2 -pkgrel=2 +pkgver=0.3 +pkgrel=1 pkgdesc="Configuration and other files required to make lib32 work." url="http://frugalware.org" depends=() groups=('lib32-extra') archs=('!i686' 'x86_64') up2date="$pkgver" -source=('ld-wrapper.c') -sha1sums=('460558bfee4168a022a226d711255e62e3face26') +source=('lib32.sh') +sha1sums=('c2da0a561a607896e05de144ed997ba7641d09f1') build() { # Tells ldconfig how to find 32 bit libraries. @@ -22,14 +22,12 @@ build() { /usr/local/lib32 EOF - # Tells binfmt how to load 32 bit binaries. - Fmkdir /etc/binfmt.d/ - cat > "$Fdestdir/etc/binfmt.d/lib32.conf" << EOF -:lib32:M::\x7f\x45\x4c\x46\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x03\x00\x01\x00\x00\x00::/lib32/ld-wrapper: -EOF - # Create the 32 bit library directories. Fmkdir /lib32 /usr/lib32 /usr/local/lib32 - gcc -Wall -Wextra $CFLAGS ld-wrapper.c -o "$Fdestdir/lib32/ld-wrapper" || Fdie + # Tells ldconfig how to find the dynamic loader. + Fln ../lib32/ld-linux.so.2 /lib/ld-linux.so.2 + + # Sets the environment variables for 32 bit binaries to work correctly. + Fexerel /etc/profile.d/lib32.sh } diff --git a/source/lib32-extra/lib32/ld-wrapper.c b/source/lib32-extra/lib32/ld-wrapper.c deleted file mode 100644 index 9257f09..0000000 --- a/source/lib32-extra/lib32/ld-wrapper.c +++ /dev/null @@ -1,36 +0,0 @@ -#include <stdlib.h> -#include <unistd.h> - -typedef struct { - char *key; - char *value; -} table_pair_t; - -static void prepare_environment(void) { - static const table_pair_t table[] = { - { "LIBGL_DRIVERS_PATH", "/usr/lib32/dri" }, - { "WINEDLLPATH", "/usr/lib32/wine" }, - { NULL, NULL } - }; - size_t i; - - for( i = 0 ; table[i].key != NULL ; ++i ) { - setenv(table[i].key, table[i].value, 1); - } -} - -static void launch_binary(char **argv) { - static const char ld[] = "/lib32/ld-linux.so.2"; - - execv(ld, argv); -} - -int main(int argc, char **argv) { - (void) argc; - - prepare_environment(); - - launch_binary(&argv[0]); - - return 1; -} diff --git a/source/lib32-extra/lib32/lib32.install b/source/lib32-extra/lib32/lib32.install deleted file mode 100644 index 9ddf20c..0000000 --- a/source/lib32-extra/lib32/lib32.install +++ /dev/null @@ -1,8 +0,0 @@ -post_install() -{ - /lib/systemd/systemd-binfmt lib32.conf -} - -op=$1 -shift -$op $* diff --git a/source/lib32-extra/lib32/lib32.sh b/source/lib32-extra/lib32/lib32.sh new file mode 100644 index 0000000..e229d75 --- /dev/null +++ b/source/lib32-extra/lib32/lib32.sh @@ -0,0 +1,2 @@ +export LIBGL_DRIVERS_PATH='/usr/lib/dri:/usr/lib32/dri' +export WINEDLLPATH='/usr/lib/wine:/usr/lib32/wine' _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
