Add support for building on uClibc systems #135081 by James Le Cuirot.
authorMike Frysinger <vapier@gentoo.org>
Thu, 8 Jun 2006 09:52:04 +0000 (09:52 +0000)
committerMike Frysinger <vapier@gentoo.org>
Thu, 8 Jun 2006 09:52:04 +0000 (09:52 +0000)
Package-Manager: portage-2.1_rc4-r3

dev-games/clanlib/ChangeLog
dev-games/clanlib/clanlib-0.6.5-r3.ebuild
dev-games/clanlib/files/clanlib-0.6.5-uclibc.patch [new file with mode: 0644]

index 7d7713e615dd671fac4b09d97e6e42e38acd9623..e30aab79116384d658ab7c3c6a255f610796bdec 100644 (file)
@@ -1,6 +1,10 @@
 # ChangeLog for dev-games/clanlib
 # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-games/clanlib/ChangeLog,v 1.31 2006/05/13 02:36:47 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-games/clanlib/ChangeLog,v 1.32 2006/06/08 09:52:04 vapier Exp $
+
+  08 Jun 2006; Mike Frysinger <vapier@gentoo.org>
+  +files/clanlib-0.6.5-uclibc.patch, clanlib-0.6.5-r3.ebuild:
+  Add support for building on uClibc systems #135081 by James Le Cuirot.
 
   13 May 2006; Mike Frysinger <vapier@gentoo.org>
   files/clanlib-0.6.5-DirectFB-update.patch:
index 56b8b90d387bea4840174515323960d214517c0b..272d0fb3ac8a1ca67178e945af9012b049054f8e 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2006 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-games/clanlib/clanlib-0.6.5-r3.ebuild,v 1.6 2006/02/11 16:57:21 joshuabaergen Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-games/clanlib/clanlib-0.6.5-r3.ebuild,v 1.7 2006/06/08 09:52:04 vapier Exp $
 
 inherit eutils flag-o-matic
 
@@ -46,6 +46,7 @@ src_unpack() {
        epatch "${FILESDIR}"/${P}-DirectFB-update.patch
        epatch "${FILESDIR}"/${P}-freetype.patch
        epatch "${FILESDIR}"/${P}-gcc41.patch
+       epatch "${FILESDIR}"/${P}-uclibc.patch
        sed -i 's:@comp_mode@::' Setup/Unix/clanlib-config.in
 }
 
diff --git a/dev-games/clanlib/files/clanlib-0.6.5-uclibc.patch b/dev-games/clanlib/files/clanlib-0.6.5-uclibc.patch
new file mode 100644 (file)
index 0000000..3bace3e
--- /dev/null
@@ -0,0 +1,64 @@
+Add support for building on uClibc systems
+
+http://bugs.gentoo.org/135081
+
+Patch by James Le Cuirot
+
+--- ClanLib-0.6.5/Sources/Sound/Sound/ClanSound/cdaudio_linux.cpp
++++ ClanLib-0.6.5/Sources/Sound/Sound/ClanSound/cdaudio_linux.cpp
+@@ -19,7 +19,7 @@
+ #include <fcntl.h>
+ #ifndef Solaris // we'll need to define Solaris
+-#include <fstab.h> // there's no fstab.h on Solaris...
++#include <mntent.h> // not sure if mntent.h is on Solaris...
+ #else
+ #include <sys/vfstab.h> //...but vfstab.h
+ #endif
+@@ -82,17 +82,17 @@
+       
+       // We start by looking the mounttab:
+       
+-#ifdef Solaris
+       FILE *f_mnttab = fopen("/etc/mnttab", "r");
++#ifdef Solaris
+       vfstab *mount_file;
+       getvfsent(f_mnttab, mount_file);
+ #else
+-      fstab *mount_file = getfsent();
++      mntent *mount_file = getmntent(f_mnttab);
+ #endif
+       while(mount_file != NULL)
+       {
+ #ifndef Solaris
+-              if(strncmp(mount_file->fs_vfstype,"iso9660",7)==0) 
++              if(strncmp(mount_file->mnt_type,"iso9660",7)==0) 
+ #else
+               if(strncmp(mount_file->vfs_fstype,"iso9660",7)==0) // ugly code... suggestions ?
+ #endif
+@@ -100,7 +100,7 @@
+                       try
+                       {
+ #ifndef Solaris
+-                              CL_CDAudio::cd_drives.push_back(new CL_CDDrive_Linux(mount_file->fs_spec));
++                              CL_CDAudio::cd_drives.push_back(new CL_CDDrive_Linux(mount_file->mnt_fsname));
+ #else
+                               CL_CDAudio::cd_drives.push_back(new CL_CDDrive_Linux(mount_file->vfs_special));
+ #endif
+@@ -112,14 +112,14 @@
+                       }
+               }
+ #ifndef Solaris
+-              mount_file = getfsent();
++              mount_file = getmntent(f_mnttab);
+ #else
+               getvfsent(f_mnttab, mount_file);
+ #endif
+               //              cout << mount_file->fs_vfstype << endl;
+       }
+ #ifndef Solaris
+-      endfsent();
++      endmntent(f_mnttab);
+ #else
+       fclose(f_mnttab);
+ #endif