--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: tex-guy: fails to build on GNU/kFreeBSd
- From: Aurelien Jarno <aurel32@debian.org>
- Date: Thu, 29 Dec 2005 18:23:26 +0100
- Message-id: <20051229172326.4976.58554.reportbug@hertz.aurel32.net>
Package: tex-guy
Severity: important
Tags: patch
Hi,
tex-guy fails to build on GNU/kFreeBSD because of wrong checks of linux
kernel instead of glibc in the source code. Please find attached a patch
to fix that. It would be nice if you could include it in the next
upload.
Thanks in advance,
Aurelien
-- System Information:
Debian Release: testing/unstable
Architecture: kfreebsd-i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: GNU/kFreeBSD 5.4-1-686
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Status: in BTS
Author: aurel32
diff -u tex-guy-1.2.4/DVIlib2-2.7.1/dvi.c tex-guy-1.2.4/DVIlib2-2.7.1/dvi.c
--- tex-guy-1.2.4/DVIlib2-2.7.1/dvi.c
+++ tex-guy-1.2.4/DVIlib2-2.7.1/dvi.c
@@ -291,7 +291,7 @@
#ifdef HAVE_STAT
-# if defined(__linux__)
+# if defined(__linux__) || defined(__GLIBC__)
f_ac = ((stat(path, &st) >= 0) && S_ISREG(st.st_mode));
# else
f_ac = ((stat(path, &st) >= 0) && ((st.st_mode & S_IFMT) == S_IFREG));
@@ -421,7 +421,7 @@
# if defined(__svr4__)
PD(dvi,file_timestamp1) = st.st_mtime;
PD(dvi,file_timestamp2) = 0;
-# elif defined(__linux__)
+# elif defined(__linux__) || defined(__GLIBC__)
PD(dvi,file_timestamp1) = st.st_mtime;
PD(dvi,file_timestamp2) = 0;
# else
@@ -457,7 +457,7 @@
# if defined(__svr4__)
if (PD(dvi,file_timestamp1) != (long)st.st_mtime)
return 1; /* modified */
-# elif defined(__linux__)
+# elif defined(__linux__) || defined(__GLIBC__)
if (PD(dvi,file_timestamp1) != (long)st.st_mtime)
return 1; /* modified */
# else
--- tex-guy-1.2.4.orig/xgdvi-1.6.1/xgdvi.c.pixmap
+++ tex-guy-1.2.4/xgdvi-1.6.1/xgdvi.c.pixmap
@@ -373,7 +373,7 @@
#if HAVE_STAT
f = g_strdup_printf("%s%s%s", g_get_home_dir(), "/", XGDVI_PERSONAL_DIR);
if (stat(f, &st) >= 0){
-#ifndef __linux__
+#if !defined(__linux__) && !defined(__GLIBC__)
isdir = ((st.st_mode & S_IFDIR) != 0);
#else
isdir = S_ISDIR(st.st_mode);
only in patch2:
unchanged:
--- tex-guy-1.2.4.orig/DVIlib2-2.7.1/utils.c
+++ tex-guy-1.2.4/DVIlib2-2.7.1/utils.c
@@ -119,7 +119,7 @@
#ifdef HAVE_STAT
if (stat(path, &st) < 0)
continue;
-# ifndef __linux__
+# if !defined(__linux__) && ! defined(__GLIBC__)
if ((st.st_mode & S_IFREG) == 0)
continue;
# else
--- End Message ---
--- Begin Message ---
Source: tex-guy
Source-Version: 1.2.4-6
We believe that the bug you reported is fixed in the latest version of
tex-guy, which is due to be installed in the Debian FTP archive:
dvilib2-dev_1.2.4-6_amd64.deb
to pool/main/t/tex-guy/dvilib2-dev_1.2.4-6_amd64.deb
dvilib2_1.2.4-6_amd64.deb
to pool/main/t/tex-guy/dvilib2_1.2.4-6_amd64.deb
spawg_1.2.4-6_amd64.deb
to pool/main/t/tex-guy/spawg_1.2.4-6_amd64.deb
spawx11_1.2.4-6_amd64.deb
to pool/main/t/tex-guy/spawx11_1.2.4-6_amd64.deb
tex-guy_1.2.4-6.diff.gz
to pool/main/t/tex-guy/tex-guy_1.2.4-6.diff.gz
tex-guy_1.2.4-6.dsc
to pool/main/t/tex-guy/tex-guy_1.2.4-6.dsc
tex-guy_1.2.4-6_amd64.deb
to pool/main/t/tex-guy/tex-guy_1.2.4-6_amd64.deb
xgdvi_1.2.4-6_amd64.deb
to pool/main/t/tex-guy/xgdvi_1.2.4-6_amd64.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 345213@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Aurelien Jarno <aurel32@debian.org> (supplier of updated tex-guy package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.7
Date: Thu, 30 Nov 2006 23:47:13 +0100
Source: tex-guy
Binary: tex-guy dvilib2-dev spawg xgdvi spawx11 dvilib2
Architecture: source amd64
Version: 1.2.4-6
Distribution: unstable
Urgency: low
Maintainer: Debian QA Group <packages@qa.debian.org>
Changed-By: Aurelien Jarno <aurel32@debian.org>
Description:
dvilib2 - a portable DVI interpreter library - runtime
dvilib2-dev - a portable DVI interpreter library - development
spawg - a simple TeX DVI previewer with a simple GTK+ UI
spawx11 - a simple TeX DVI previewer for X11
tex-guy - miscellaneous utilities using DVIlib
xgdvi - a TeX DVI previewer for X, with a nice GTK+ UI
Closes: 340249 345213 378990
Changes:
tex-guy (1.2.4-6) unstable; urgency=low
.
* QA upload.
* Added support for GNU/kFreeBSD (closes: bug#345213).
* Remove the build-dependency on awk (closes: bug#340249).
* Update upstream URL (closes: bug#378990).
Files:
63d99b5b7165b353f73c364476253f99 721 tex optional tex-guy_1.2.4-6.dsc
ffd50c18066fbe2b7c195f40da46f840 291443 tex optional tex-guy_1.2.4-6.diff.gz
8d17540daf6402dfefa3390b4e3e5833 62764 libdevel optional dvilib2-dev_1.2.4-6_amd64.deb
7072b7633daecd32982c6e8a3a7973c1 60140 libs optional dvilib2_1.2.4-6_amd64.deb
93e90efcff67f32adc0e7da93199b09e 123092 tex optional xgdvi_1.2.4-6_amd64.deb
79029f216e703f4f12869b12fae4efbc 25488 tex optional spawx11_1.2.4-6_amd64.deb
760a9285372d4141e8331d8d4a5a2ad8 32140 tex optional spawg_1.2.4-6_amd64.deb
22805f350d4a810be82dbfe876bad1e9 39594 tex optional tex-guy_1.2.4-6_amd64.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
iD8DBQFFb2I9w3ao2vG823MRAiBlAJ9DaS+V+34fBO+8TMU3URwabUQi1gCeNgnf
cbOvD9B8AdqL8bgx+k7ja5s=
=1TI5
-----END PGP SIGNATURE-----
--- End Message ---