ports/x11/xorg-cf-files/files/patch-FreeBSD.cf
Baptiste Daroussin 932db7c46c New USES imake to handle the dependency on imake.
This uses accept 'env' as an argument for ports that do use their own or a different do-configure target.

Modify xmkmf so it accept IMAKECPPFLAGS as default flags for imake and pass it to the called imake.
Modify xorg-cf-files (the FreeBSD.cf configuration file) to allow CppCmd to be overwritten.
Pass CppCmd CcCmd and CplusplusCmd via command line to each call of imake via IMAKECPPFLAGS
Pass IMAKE_DEFINE with the above arguments to MAKE_ARGS so that imake spawned from Makefile generated by a previous
imake also inherit the defined CppCmd CcCmd and CplusplusCmd.
Make imake use devel/tradcpp all the time, so that when buidling with clang we do not depend on gcc's cpp.
Make imake respect CC and CXX
Make imake respect USE_GCC (if set imake will use gcc's cpp).

While here:
- Remove a couple of indefinite articles from comments
- Trim headers
- Fix a couple of ports to build with clang or use: USE_GCC=any
- Fix a now useless redefinition of the extraction chain
- Fix a typo in japanese/Wnn7-lib bundled imake template definitions
- Fix some XMKMF execution with no env specified
- Use options helper in x11/xautolock to simplify the port
2013-06-28 11:51:05 +00:00

74 lines
1.9 KiB
CFEngine3

--- ./FreeBSD.cf.orig 2009-10-16 23:45:42.000000000 +0200
+++ ./FreeBSD.cf 2013-06-27 17:14:30.661790922 +0200
@@ -78,6 +78,7 @@
#define HasIssetugid YES
#define HasPoll YES
#endif
+#define BuildHtmlManPages NO
#if OSMajorVersion >= 4
#define HasGetIfAddrs YES
@@ -117,14 +118,8 @@
# if (OSRelVersion < 500043)
# define NeedUIThrStubs YES
# endif
-# if (OSRelVersion >= 502102)
-# define ThreadsLibraries -lpthread
-# elif (OSRelVersion >= 500016)
-# define ThreadsLibraries -lc_r
-# else
-# define ThreadsLibraries -pthread
-# endif
-# define SystemMTDefines -D_THREAD_SAFE
+# define ThreadsLibraries -lpthread
+# define SystemMTDefines
#endif
/* This fixes linking C programs against libGLU on FreeBSD 3.x */
@@ -178,7 +173,9 @@
#ifndef CplusplusCmd
#define CplusplusCmd c++
#endif
+#ifndef CppCmd
#define CppCmd /usr/bin/cpp
+#endif
#define PreProcessCmd CppCmd
#define StandardCppOptions -traditional
#define StandardCppDefines /**/
@@ -338,7 +335,7 @@
#ifndef LibraryRpathLoadFlags
# if UseRpath
# if UseElfFormat
-# define LibraryRpathLoadFlags -rpath $(USRLIBDIRPATH)
+# define LibraryRpathLoadFlags -Wl,-rpath $(USRLIBDIRPATH)
# else
# define LibraryRpathLoadFlags -R $(USRLIBDIRPATH)
# endif
@@ -470,14 +467,14 @@
/* The GCC strength-reduce bug is fixed for FreeBSD 2.1.5 and later */
#ifndef DefaultGcc2i386Opt
#if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion > 1) || (OSMajorVersion == 2 && OSMinorVersion == 1 && OSTeenyVersion >= 5)
-#define DefaultGcc2i386Opt -O2 GccAliasingArgs
+#define DefaultGcc2i386Opt
#endif
#endif
#ifdef i386Architecture
# define OptimizedCDebugFlags DefaultGcc2i386Opt
#else
-# define OptimizedCDebugFlags -O
+# define OptimizedCDebugFlags
#endif
#ifndef PreIncDir
@@ -498,6 +495,10 @@
#define SystemManDirectory /usr/share/man
#endif
+#ifndef UseConfDirForAppDefaults
+#define UseConfDirForAppDefaults NO
+#endif
+
#define InstKmemFlags -g kmem -m 2755
/*