[MacPorts] #74043: texlive-bin @2025.74524_1 does not rebuild on PPC Leopard, Mac OS X 10.5.8, because TeX Live sources redefine getopt() and getenv() and in pTeX a variable is named "bool"!
MacPorts
noreply at macports.org
Wed May 27 16:55:45 UTC 2026
#74043: texlive-bin @2025.74524_1 does not rebuild on PPC Leopard, Mac OS X 10.5.8,
because TeX Live sources redefine getopt() and getenv() and in pTeX a
variable is named "bool"!
--------------------------+-------------------------
Reporter: ballapete | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.12.5
Resolution: | Keywords: ppc leopard
Port: texlive-bin |
--------------------------+-------------------------
Comment (by ballapete):
The splendid Gentoo patch changes `kpathsea/getopt.h` like this:
{{{
leopard pete 241 /\ diff -u /opt/local/include/kpathsea/getopt.h
/opt/local/var/macports/build/texlive-bin-9d7eb26d/work/texlive-
source-2025.74524-stripped/texk/kpathsea/getopt.h
--- /opt/local/include/kpathsea/getopt.h 2025-04-23
12:57:29.000000000 +0200
+++ /opt/local/var/macports/build/texlive-bin-9d7eb26d/work/texlive-
source-2025.74524-stripped/texk/kpathsea/getopt.h 2026-05-27
13:16:10.000000000 +0200
@@ -117,20 +117,8 @@
#define optional_argument 2
#endif /* need getopt */
-#if defined(__GNU_LIBRARY__) || defined (WIN32) || defined (__CYGWIN__)
-/* Many other libraries have conflicting prototypes for getopt, with
- differences in the consts, in stdlib.h. To avoid compilation
- errors, only prototype getopt for the GNU C library. And not when
- compiling with C++; g++ 4.7.0 chokes on conflicting exception
- specifications. */
-#if !defined (__cplusplus)
-extern KPSEDLL int getopt (int argc, char *const *argv, const char
*shortopts);
-#endif
#if defined (__MINGW32__) || defined (__CYGWIN__)
-#define __GETOPT_H__ /* Avoid that <unistd.h> redeclares the getopt API.
*/
-#endif
-#elif !defined (__cplusplus)
-extern KPSEDLL int getopt ();
+ #define __GETOPT_H__ /* Avoid that <unistd.h> redeclares the getopt
API. */
#endif
#ifndef __need_getopt
}}}
--
Ticket URL: <https://trac.macports.org/ticket/74043#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list