r11940 - in packages/trunk/fenix/debian: . patches
Peter Pentchev
roam-guest at alioth.debian.org
Tue Mar 15 12:16:16 UTC 2011
Author: roam-guest
Date: 2011-03-15 12:16:11 +0000 (Tue, 15 Mar 2011)
New Revision: 11940
Added:
packages/trunk/fenix/debian/patches/kfreebsd.patch
Modified:
packages/trunk/fenix/debian/changelog
packages/trunk/fenix/debian/patches/series
Log:
Fix the FTBFS on GNU/kFreeBSD.
Modified: packages/trunk/fenix/debian/changelog
===================================================================
--- packages/trunk/fenix/debian/changelog 2011-03-15 03:30:57 UTC (rev 11939)
+++ packages/trunk/fenix/debian/changelog 2011-03-15 12:16:11 UTC (rev 11940)
@@ -1,3 +1,9 @@
+fenix (0.92a.dfsg1-8) UNRELEASED; urgency=low
+
+ * Add the kfreebsd patch to fix the FTBFS on GNU/kFreeBSD.
+
+ -- Peter Pentchev <roam at ringlet.net> Mon, 14 Mar 2011 12:44:14 +0200
+
fenix (0.92a.dfsg1-7) unstable; urgency=low
* Team upload.
Added: packages/trunk/fenix/debian/patches/kfreebsd.patch
===================================================================
--- packages/trunk/fenix/debian/patches/kfreebsd.patch (rev 0)
+++ packages/trunk/fenix/debian/patches/kfreebsd.patch 2011-03-15 12:16:11 UTC (rev 11940)
@@ -0,0 +1,101 @@
+Description: Fix the build on GNU/kFreeBSD
+Forwarded: no
+Author: Peter Pentchev <roam at ringlet.net>
+Last-Update: 2011-03-15
+
+--- a/configure
++++ b/configure
+@@ -1621,7 +1621,7 @@
+
+
+ case "$target_os" in
+- linux-gnu*)
++ linux-gnu*|kfreebsd-gnu*)
+ case "$target_cpu" in
+ powerpc*)
+ COMMON_CFLAGS="-Wall -DTARGET_LinuxPPC -DTARGET_Linux"
+--- a/configure.in
++++ b/configure.in
+@@ -40,7 +40,7 @@
+
+ dnl Aqui es donde se chequeara el SO, pero solo hay una opcion xD
+ case "$target_os" in
+- linux-gnu*)
++ linux-gnu*|kfreebsd-gnu*)
+ case "$target_cpu" in
+ powerpc*)
+ COMMON_CFLAGS="-Wall -DTARGET_LinuxPPC -DTARGET_Linux"
+--- a/fxi/src/i_func.c
++++ b/fxi/src/i_func.c
+@@ -3577,6 +3577,27 @@
+
+ #elif !defined(TARGET_MAC)
+ /* Linux and other Unix (?) */
++#ifdef __FreeBSD_kernel__
++ long pagesize, freeram;
++
++ pagesize = sysconf(_SC_PAGE_SIZE);
++ freeram = sysconf(_SC_AVPHYS_PAGES);
++ if (pagesize == -1L)
++ {
++ gr_con_printf (_("No pagesize"));
++ return -1;
++ }
++ else if (freeram == -1L)
++ {
++ gr_con_printf (_("No freeram"));
++ return -1;
++ }
++ else
++ {
++ gr_con_printf (_("Returning %d"), pagesize * freeram);
++ return pagesize * freeram;
++ }
++#else
+ struct sysinfo meminf;
+ int fv;
+
+@@ -3596,6 +3617,7 @@
+ gr_con_printf (_("Returning %d"), meminf.freeram);
+ return meminf.freeram;
+ }
++#endif
+
+ return -1;
+
+@@ -3623,6 +3645,27 @@
+
+ #elif !defined(TARGET_MAC)
+ /* Linux and other Unix (?) */
++#ifdef __FreeBSD_kernel__
++ long pagesize, totalram;
++
++ pagesize = sysconf(_SC_PAGE_SIZE);
++ totalram = sysconf(_SC_PHYS_PAGES);
++ if (pagesize == -1L)
++ {
++ gr_con_printf (_("No pagesize"));
++ return -1;
++ }
++ else if (totalram == -1L)
++ {
++ gr_con_printf (_("No totalram"));
++ return -1;
++ }
++ else
++ {
++ gr_con_printf (_("Returning %d"), pagesize * totalram);
++ return pagesize * totalram;
++ }
++#else
+ struct sysinfo meminf;
+ int fv;
+
+@@ -3636,6 +3679,7 @@
+ return meminf.totalram * meminf.mem_unit;
+ else
+ return meminf.totalram;
++#endif
+
+ return -1;
+
Modified: packages/trunk/fenix/debian/patches/series
===================================================================
--- packages/trunk/fenix/debian/patches/series 2011-03-15 03:30:57 UTC (rev 11939)
+++ packages/trunk/fenix/debian/patches/series 2011-03-15 12:16:11 UTC (rev 11940)
@@ -24,3 +24,4 @@
string_alloc_crash.patch
spelling.patch
headers.patch
+kfreebsd.patch
More information about the Pkg-games-commits
mailing list