diff -Nru X11ForMacOSXSource-1.0.orig/xc/config/cf/Imakefile X11ForMacOSXSource-1.0/xc/config/cf/Imakefile --- X11ForMacOSXSource-1.0.orig/xc/config/cf/Imakefile Fri Mar 14 08:56:16 2003 +++ X11ForMacOSXSource-1.0/xc/config/cf/Imakefile Fri Feb 27 02:39:42 2004 @@ -133,7 +133,7 @@ all:: -#if BuildLibraries +#if BuildLibraries || ForceInstallConfigFiles InstallMultipleDestFlags(install,$(INSTFILES),$(CONFIGDIR),$(INSTDATFLAGS)) #endif diff -Nru X11ForMacOSXSource-1.0.orig/xc/config/cf/X11.tmpl X11ForMacOSXSource-1.0/xc/config/cf/X11.tmpl --- X11ForMacOSXSource-1.0.orig/xc/config/cf/X11.tmpl Sat Mar 15 06:32:13 2003 +++ X11ForMacOSXSource-1.0/xc/config/cf/X11.tmpl Fri Feb 27 02:39:42 2004 @@ -2181,14 +2181,14 @@ #define GLwUseXmStubs NO /* create stub (weak) Motif symbols */ #endif #else -#undef SharedLibGlw -#define SharedLibGlw NO -#undef NormalLibGlw -#define NormalLibGlw NO -#undef DebugLibGlw -#define DebugLibGlw NO -#undef ProfileLibGlw -#define ProfileLibGlw NO +#undef SharedLibGLw +#define SharedLibGLw NO +#undef NormalLibGLw +#define NormalLibGLw NO +#undef DebugLibGLw +#define DebugLibGLw NO +#undef ProfileLibGLw +#define ProfileLibGLw NO #endif #ifndef SharedLibXext diff -Nru X11ForMacOSXSource-1.0.orig/xc/config/cf/darwin.cf X11ForMacOSXSource-1.0/xc/config/cf/darwin.cf --- X11ForMacOSXSource-1.0.orig/xc/config/cf/darwin.cf Sat Mar 15 06:32:13 2003 +++ X11ForMacOSXSource-1.0/xc/config/cf/darwin.cf Sat Apr 9 05:24:23 2005 @@ -121,8 +121,14 @@ #define MkdirHierCmd mkdir -p +#define ConfigDir !PREFIX!/fix-apple-x11/lib/X11/config +/* The gcc 3.3 cpp that Apple ships inserts spurious #pragmas */ +#define CppSedMagic sed -e '/^# *[0-9][0-9]* *.*$$/d' -e '/# *pragma /d' -e '/^XCOMM$$/s//#/' -e '/^XCOMM[^a-zA-Z0-9_]/s/^XCOMM/#/' /* our cpp isn't in /lib/cpp and early versions don't like -undef */ #define CppCmd /usr/bin/cpp +#if (GccMajorVersion == 3) && (GccMinorVersion == 3) || (GccMajorVersion > 3) +# define StandardCppOptions -traditional -D__GNUC__ +#endif #if HasGcc3 # define RawCppCmd CppCmd -undef #else @@ -157,16 +163,22 @@ #define OptimizedCDebugFlags -g -Os #define ByteOrder UNKNOWN_BYTE_ORDER +#if OSMajorVersion < 7 +# define DarwinLocaleDefines -DX_LOCALE +#else +# define DarwinLocaleDefines /**/ +/* we use installed Apple's Xaw */ +/* # define XawI18nDefines -DHAS_WCHAR_H -DHAS_WCTYPE_H -DNO_WIDEC_H */ +#endif + /* * __DARWIN__ will be used for platform specific #ifdefs that can't * be handled by existing X defines. * * Darwin's alloca() seg faults (rather than returning NULL) on failed * allocations, so we can't use it. - * - * Darwin's setlocale() doesn't work properly, so use X11's instead. */ -#define StandardDefines -D__DARWIN__ -DNO_ALLOCA -DX_LOCALE -DCSRG_BASED +#define StandardDefines -D__DARWIN__ -DNO_ALLOCA -DCSRG_BASED DarwinLocaleDefines /* * Set this to NO to just build the client libs, which should work without diff -Nru X11ForMacOSXSource-1.0.orig/xc/config/cf/host.def X11ForMacOSXSource-1.0/xc/config/cf/host.def --- X11ForMacOSXSource-1.0.orig/xc/config/cf/host.def Thu Jan 1 09:00:00 1970 +++ X11ForMacOSXSource-1.0/xc/config/cf/host.def Sat Apr 9 06:04:25 2005 @@ -0,0 +1,34 @@ +#ifdef BeforeVendorCF + +#define BuildServersOnly YES /* fake */ +#define BuildServer NO +#define XAppleServer NO +#define NormalX11Lib YES +#define BuildX11Lib YES +#define LinkGLToUsrInclude NO +#define BuildGlxExt NO +#define InstallEmptyHostDef +#define NothingOutsideProjectRoot YES + +#define ProjectRoot FinkPrefix/fix-apple-x11 +#define XLocaleDir OriginalLibDir/locale +#define X11perfcompLib OriginalLibDir/x11perfcomp + +/* our local facility */ +#define FinkPrefix !PREFIX! +#define BuildCppScripts YES +#define BuildCppScriptsOnly YES +#define OriginalBinDir /usr/X11R6/bin +#define OriginalLibDir /usr/X11R6/lib/X11 +#define RstartLibDir OriginalLibDir/rstart +#define DontBuildFontLib YES +#define ForceInstallConfigFiles YES + +#endif /* BeforeVendorCF */ + +#ifdef AfterVendorCF + +#undef BuildXInputLib +#define BuildXInputLib NO + +#endif /* BeforeVendorCF */ diff -Nru X11ForMacOSXSource-1.0.orig/xc/files-to-remove X11ForMacOSXSource-1.0/xc/files-to-remove --- X11ForMacOSXSource-1.0.orig/xc/files-to-remove Thu Jan 1 09:00:00 1970 +++ X11ForMacOSXSource-1.0/xc/files-to-remove Fri Feb 27 02:39:42 2004 @@ -0,0 +1,11 @@ +bin/lndir +bin/cleanlinks +bin/imake +bin/makedepend +bin/makeg +bin/makestrs +bin/mkdirhier +bin/mkhtmlindex +bin/revpath +bin/rman +lib/libX11.dylib diff -Nru X11ForMacOSXSource-1.0.orig/xc/fix-apple-x11.csh X11ForMacOSXSource-1.0/xc/fix-apple-x11.csh --- X11ForMacOSXSource-1.0.orig/xc/fix-apple-x11.csh Thu Jan 1 09:00:00 1970 +++ X11ForMacOSXSource-1.0/xc/fix-apple-x11.csh Sat Apr 9 06:14:32 2005 @@ -0,0 +1,9 @@ +if ( ! $?finkinit_fix_apple_x11_enable ) then + set finkinit_fix_apple_x11_enable=YES +endif +switch ( $finkinit_fix_apple_x11_enable ) +case [Yy][Ee][Ss]: + setenv PATH "`!PREFIX!/fix-apple-x11/bin/prepend-path PATH !PREFIX!/fix-apple-x11/bin`" + setenv DYLD_LIBRARY_PATH "`!PREFIX!/fix-apple-x11/bin/prepend-path DYLD_LIBRARY_PATH !PREFIX!/fix-apple-x11/lib`" + breaksw +endsw diff -Nru X11ForMacOSXSource-1.0.orig/xc/fix-apple-x11.sh X11ForMacOSXSource-1.0/xc/fix-apple-x11.sh --- X11ForMacOSXSource-1.0.orig/xc/fix-apple-x11.sh Thu Jan 1 09:00:00 1970 +++ X11ForMacOSXSource-1.0/xc/fix-apple-x11.sh Sat Apr 9 06:14:27 2005 @@ -0,0 +1,8 @@ +: ${finkinit_fix_apple_x11_enable=YES} +case "$finkinit_fix_apple_x11_enable" in +[Yy][Ee][Ss]) + PATH=`!PREFIX!/fix-apple-x11/bin/prepend-path PATH !PREFIX!/fix-apple-x11/bin` + DYLD_LIBRARY_PATH=`!PREFIX!/fix-apple-x11/bin/prepend-path DYLD_LIBRARY_PATH !PREFIX!/fix-apple-x11/lib` + export PATH DYLD_LIBRARY_PATH + ;; +esac diff -Nru X11ForMacOSXSource-1.0.orig/xc/lib/Imakefile X11ForMacOSXSource-1.0/xc/lib/Imakefile --- X11ForMacOSXSource-1.0.orig/xc/lib/Imakefile Fri Mar 14 08:58:19 2003 +++ X11ForMacOSXSource-1.0/xc/lib/Imakefile Fri Feb 27 02:39:42 2004 @@ -164,7 +164,9 @@ FONTCACHELIBDIR = Xfontcache #endif +#if !DontBuildFontLib FONTSUBDIR = font +#endif #if BuildFontEncLib FONTENCSUBDIR = fontenc diff -Nru X11ForMacOSXSource-1.0.orig/xc/lib/X11/Imakefile X11ForMacOSXSource-1.0/xc/lib/X11/Imakefile --- X11ForMacOSXSource-1.0.orig/xc/lib/X11/Imakefile Fri Mar 14 08:58:32 2003 +++ X11ForMacOSXSource-1.0/xc/lib/X11/Imakefile Sun Apr 4 04:17:15 2004 @@ -84,9 +84,15 @@ XF86BIGFONT_DEFINES = XF86BigfontExtensionDefines +#ifdef OriginalLibDir + EDB_DEFINES = -DERRORDB=\"OriginalLibDir/XErrorDB\" + KDB_DEFINES = -DKEYSYMDB=\"OriginalLibDir/XKeysymDB\" + CMS_DEFINES = -DXCMSDB=\"OriginalLibDir/Xcms.txt\" +#else EDB_DEFINES = -DERRORDB=\"$(LIBDIR)/XErrorDB\" KDB_DEFINES = -DKEYSYMDB=\"$(LIBDIR)/XKeysymDB\" CMS_DEFINES = -DXCMSDB=\"$(LIBDIR)/Xcms.txt\" +#endif #if HasSnprintf MISC_DEFINES = -DHAS_SNPRINTF -DLIBX11 #endif @@ -128,9 +134,12 @@ AUTHSRCS = AuDispose.c AuGetBest.c AuFileName.c AuRead.c SRCS = $(SRCS1) $(SRCS2) $(SRCS3) $(EXTRASRCS) /* try *.c if you have trouble */ HEADERS = Xlib.h Xresource.h Xutil.h cursorfont.h Xlibint.h \ - Xcms.h Xlocale.h XKBlib.h + Xcms.h Xlocale.h XKBlib.h $(AUTHHEADERS) LINTLIBS = +#if !BuildXauLib +AUTHHEADERS = Xauth.h +#endif #if BuildLoadableXlibI18n && DoSharedLib EXTRASHAREDSRC = $(SHAREDLCSRCS) #endif @@ -1028,11 +1037,13 @@ SpecialCLibObjectRuleSeparateOpts(PutImage,$(ICONFIGFILES),$(_NOOP_),$(XCURSOR_DEFINES)) #endif +#ifndef OriginalLibDir #if InstallXcmsTxt InstallNonExecFile(Xcms.txt,$(LIBDIR)) #endif InstallNonExecFile(XErrorDB,$(LIBDIR)) InstallNonExecFile(XKeysymDB,$(LIBDIR)) +#endif InstallLintLibrary(X11,$(LINTLIBDIR)) @@ -1040,6 +1051,9 @@ LinkSourceFile(AuGetBest.c,$(XAUTHSRC)) LinkSourceFile(AuFileName.c,$(XAUTHSRC)) LinkSourceFile(AuRead.c,$(XAUTHSRC)) +#if !BuildXauLib +LinkSourceFile(Xauth.h,$(XAUTHSRC)) +#endif #if HasKrb5 LinkSourceFile(k5encode.c,$(XAUTHSRC)) #endif diff -Nru X11ForMacOSXSource-1.0.orig/xc/lib/X11/SetLocale.c X11ForMacOSXSource-1.0/xc/lib/X11/SetLocale.c --- X11ForMacOSXSource-1.0.orig/xc/lib/X11/SetLocale.c Fri Mar 14 08:58:34 2003 +++ X11ForMacOSXSource-1.0/xc/lib/X11/SetLocale.c Fri Feb 27 02:39:43 2004 @@ -123,6 +123,17 @@ #else /* X_LOCALE */ +#ifdef __DARWIN__ +char * +_Xsetlocale( + int category, + _Xconst char *name +) +{ + return setlocale(category, name); +} +#endif /* __DARWIN__ */ + /* * _XlcMapOSLocaleName is an implementation dependent routine that derives * the LC_CTYPE locale name as used in the sample implementation from that diff -Nru X11ForMacOSXSource-1.0.orig/xc/prepend-path X11ForMacOSXSource-1.0/xc/prepend-path --- X11ForMacOSXSource-1.0.orig/xc/prepend-path Thu Jan 1 09:00:00 1970 +++ X11ForMacOSXSource-1.0/xc/prepend-path Sat Apr 9 03:47:31 2005 @@ -0,0 +1,38 @@ +#! /bin/sh +# vim: set sw=4 ts=8 sts=4: +# +# Usage: prepend-path ENVNAME "/foo/bin:/white spaces in path/bin" +# +# $ VAR=/foo1/bin:/foo2/bin; export VAR +# $ VAR=`prepend-path VAR "/bar1/bin:/foo1/bin:/bar2/bin"` +# $ echo "$VAR" +# /bar1/bin:/bar2/bin:/foo1/bin:/foo2/bin +# +# You can use or modify or redistribute or do anything to this script +# as if it were in public domain, although Japan's laws do not admit +# to disclaim one's copyright. +# +# Author: AIDA Shinra +# +eval "result=\$$1" +IFS=: + +case x$2 in + x) echo "$result"; exit 0 ;; +esac +set x $2; shift +rlist=$1; shift +for p +do + rlist=$p:$rlist +done + +for p in $rlist +do + case x$result in + x) result=$p ;; + x"$p"|x"$p":*|x*:"$p"|x*:"$p":*) ;; + x*) result=$p:$result ;; + esac +done +echo "$result" diff -Nru X11ForMacOSXSource-1.0.orig/xc/programs/Imakefile X11ForMacOSXSource-1.0/xc/programs/Imakefile --- X11ForMacOSXSource-1.0.orig/xc/programs/Imakefile Sat Mar 15 06:35:03 2003 +++ X11ForMacOSXSource-1.0/xc/programs/Imakefile Fri Feb 27 02:39:43 2004 @@ -108,8 +108,12 @@ XCURSORGENDIR = xcursorgen #endif +#if BuildCppScripts +CPPSCRIPTDIR = rstart x11perf xinit +#endif + #if BuildServersOnly || !BuildClients -SUBDIRS = $(XSSRCDIR) +SUBDIRS = $(XSSRCDIR) $(CPPSCRIPTDIR) #else SUBDIRS = \ appres bdftopcf bitmap \ diff -Nru X11ForMacOSXSource-1.0.orig/xc/programs/rstart/Imakefile X11ForMacOSXSource-1.0/xc/programs/rstart/Imakefile --- X11ForMacOSXSource-1.0.orig/xc/programs/rstart/Imakefile Fri Mar 14 08:58:47 2003 +++ X11ForMacOSXSource-1.0/xc/programs/rstart/Imakefile Fri Feb 27 02:39:43 2004 @@ -37,7 +37,10 @@ OS= CLIENTNAME=rstart -MYLIBDIR=$(LIBDIR)/rstart +#ifndef RstartLibDir +# define RstartLibDir $(LIBDIR)/rstart +#endif +MYLIBDIR=RstartLibDir ENVPREFIX=RSTART PACKAGEname=rstart @@ -65,11 +68,13 @@ PEDEFS = -DNOPUTENV #endif +#if !BuildCppScriptsOnly AllTarget(ProgramTargetName($(RSERVERNAME))) NormalProgramTarget($(RSERVERNAME), $(OBJS),NullParameter,NullParameter,NullParameter) InstallProgram($(RSERVERNAME),$(MYLIBDIR)) SpecialCObjectRule(server,NullParameter,$(SRVDEFS) $(PEDEFS)) +#endif AllTarget($(SSERVERNAME)) CppScriptTarget($(SSERVERNAME),$(SSERVERSRC),$(OS) -DLIBDIR=$(MYLIBDIR) -DSERVERNAME=$(SERVERNAME),NullParameter) @@ -79,6 +84,7 @@ CppScriptTarget($(CLIENTNAME),client.cpp,-DRSHCMD=$(RSHCMD) -DSERVERNAME=$(SERVERNAME),NullParameter) InstallNamedProg($(CLIENTNAME),$(CLIENTNAME),$(BINDIR)) +#if !BuildCppScriptsOnly AllTarget(config) CppFileTarget(config,config.cpp,-DBINDIR=$(BINDIR) -DLIBDIR=$(MYLIBDIR) -DPACKAGEname=$(PACKAGEname) -DENVPREFIX=$(ENVPREFIX),NullParameter) InstallNonExecFile(config,$(MYLIBDIR)) @@ -146,6 +152,7 @@ Recurse(commands,$(MYLIBDIR),FilterCommand) Recurse(contexts,$(MYLIBDIR),FilterContext) InstallAliases() +#endif /* !BuildCppScriptsOnly */ InstallManPage(rstart,$(MANDIR)) InstallManPage(rstartd,$(MANDIR)) @@ -155,5 +162,7 @@ XCOMM # DNS.) XCOMM #CFLAGS=-DODT1_DISPLAY_HACK +#if !BuildCppScriptsOnly LinkConfDirectory(rstart,.,rstart,.) +#endif diff -Nru X11ForMacOSXSource-1.0.orig/xc/programs/x11perf/Imakefile X11ForMacOSXSource-1.0/xc/programs/x11perf/Imakefile --- X11ForMacOSXSource-1.0.orig/xc/programs/x11perf/Imakefile Fri Mar 14 08:58:49 2003 +++ X11ForMacOSXSource-1.0/xc/programs/x11perf/Imakefile Fri Feb 27 02:39:43 2004 @@ -50,16 +50,20 @@ #endif #endif +#if !BuildCppScriptsOnly ComplexProgramTarget(x11perf) +#endif all:: x11perfcomp CppScriptTarget(x11perfcomp,x11pcomp.cpp,-DLIBPATH=$(PERFLIB),$(ICONFIGFILE)) InstallNamedProg(x11perfcomp,x11perfcomp,$(BINDIR)) +#if !BuildCppScriptsOnly InstallNamedProg(fillblnk.sh,fillblnk,$(PERFLIB)) InstallNamedProg(perfboth.sh,perfboth,$(PERFLIB)) InstallNamedProg(perfratio.sh,perfratio,$(PERFLIB)) InstallNamedProg(Xmark.sh,Xmark,$(BINDIR)) InstallManPage(Xmark,$(MANDIR)) InstallManPageLong(x11pcomp,$(MANDIR),x11perfcomp) +#endif diff -Nru X11ForMacOSXSource-1.0.orig/xc/programs/xinit/Imakefile X11ForMacOSXSource-1.0/xc/programs/xinit/Imakefile --- X11ForMacOSXSource-1.0.orig/xc/programs/xinit/Imakefile Fri Mar 14 08:58:59 2003 +++ X11ForMacOSXSource-1.0/xc/programs/xinit/Imakefile Sat Apr 9 06:28:24 2005 @@ -26,13 +26,26 @@ COOKIEDEFS = -DHAS_COOKIE_MAKER -DMK_COOKIE=MkCookieCmd #endif +#if BuildCppScriptsOnly +all:: $(SAMPLECONFIG) +#else all:: startx $(SAMPLECONFIG) ComplexProgramTarget_1(xinit,$(LOCAL_LIBRARIES),$(DEFFILE)) +#endif + +#ifdef FinkPrefix +FINK_PREFIX = FinkPrefix +ORIGINAL_BINDIR = OriginalBinDir +xinitrc: sys-xinitrc-fink.in + sed "s|@PREFIX@|$(FINK_PREFIX)|g;s|@XINITDIR@|$(XINITDIR)|g;s|@X_BINDIR@|$(ORIGINAL_BINDIR)|g" $< > $@ +MakeScriptFromCpp(startx, -DXINITDIR=$(XINITDIR) -DBINDIR=$(ORIGINAL_BINDIR) $(COOKIEDEFS)) +#else MakeScriptFromCpp(xinitrc, -DXINITDIR=$(XINITDIR)) MakeScriptFromCpp(startx, -DXINITDIR=$(XINITDIR) -DBINDIR=$(BINDIR) $(COOKIEDEFS)) +#endif EXTRAMANDEFS=-D__xinitdir__=$(XINITDIR) diff -Nru X11ForMacOSXSource-1.0.orig/xc/programs/xinit/sys-xinitrc-fink.in X11ForMacOSXSource-1.0/xc/programs/xinit/sys-xinitrc-fink.in --- X11ForMacOSXSource-1.0.orig/xc/programs/xinit/sys-xinitrc-fink.in Thu Jan 1 09:00:00 1970 +++ X11ForMacOSXSource-1.0/xc/programs/xinit/sys-xinitrc-fink.in Sat Apr 9 05:44:46 2005 @@ -0,0 +1,59 @@ +#! /bin/sh +# $Id: sys-xinitrc-fink.in,v 1.2 2005/04/08 20:44:33 aida_s Exp $ + +# This script works even after the Fink "xinitrc" package is removed. +# Don't worry. + +if test -r "@PREFIX@/etc/xinitrc-override"; then + # If system administrator dislike xinitrc.d framework, create this file + . "@PREFIX@/etc/xinitrc-override" +elif test -r "@PREFIX@/bin/xinitrc.sh"; then + . "@PREFIX@/bin/xinitrc.sh" +else + # Xterm and a window manager may be used for trouble shooting. + # Run these programs carefully. + + userresources=$HOME/.Xresources + usermodmap=$HOME/.Xmodmap + sysresources=@XINITDIR@/.Xresources + sysmodmap=@XINITDIR@/.Xmodmap + x_bindir=@X_BINDIR@ + + # merge in defaults and keymaps + + if test -f $sysresources; then + xrdb -merge $sysresources + fi + + if test -f $sysmodmap; then + xmodmap $sysmodmap + fi + + if test -f $userresources; then + xrdb -merge $userresources + fi + + if test -f $usermodmap; then + xmodmap $usermodmap + fi + + # start some nice programs + + if test -x "$x_bindir/xterm"; then + termcmd="$x_bindir/xterm" + else + termcmd="xterm" + fi + $termcmd & + + # start the window manager + + if test -x "$x_bindir/quartz-wm"; then + sessionmgr="$x_bindir/quartz-wm" + elif test -x "$x_bindir/twm"; then + sessionmgr="$x_bindir/twm" + else + sessionmgr="twm" + fi + exec $sessionmgr +fi