Fix clipping of menu texts after sizing
[xboard.git] / Makefile.am
index eaba7f4..a3051ba 100644 (file)
@@ -70,7 +70,7 @@ DISTCLEANFILES = stamp-h
 GITVERSION=$(shell sh -c 'git describe --dirty --always 2>/dev/null')
 AM_CPPFLAGS=-DINFODIR='"$(infodir)"' @X_CFLAGS@ @CAIRO_CFLAGS@ @FRONTEND_CFLAGS@  -DSYSCONFDIR='"$(sysconfdir)"' \
            -DLOCALEDIR='"$(localedir)"' -DSVGDIR='"$(svgdir)"' -D__GIT_VERSION='"$(GITVERSION)"' \
-            -DCONFIGURE_OPTIONS='"@CONFIGURE_OPTIONS@"' -DDATADIR='"$(datadir)/games/xboard"' $(headers)
+            -DCONFIGURE_OPTIONS='"@CONFIGURE_OPTIONS@"' -DDATADIR='"$(datadir)/games/xboard"' -DMANDIR='"$(mandir)"' $(headers)
 
 ACLOCAL_AMFLAGS = -I m4
 
@@ -145,6 +145,27 @@ dist_svg_DATA = svg/icon_white.svg         svg/icon_black.svg      \
            svg/BlackHCrown.svg     svg/WhiteHCrown.svg       \
            svg/BlackDolphin.svg            svg/WhiteDolphin.svg      \
            svg/BlackClaw.svg       svg/WhiteClaw.svg         \
+           svg/BlackWolf.svg       svg/WhiteWolf.svg         \
+           svg/BlackCamel.svg      svg/WhiteCamel.svg        \
+           svg/BlackZebra.svg      svg/WhiteZebra.svg        \
+           svg/BlackGnu.svg        svg/WhiteGnu.svg          \
+           svg/BlackWizard.svg     svg/WhiteWizard.svg       \
+           svg/BlackViking.svg     svg/WhiteViking.svg       \
+           svg/BlackIron.svg       svg/WhiteIron.svg         \
+           svg/BlackCopper.svg     svg/WhiteCopper.svg       \
+           svg/BlackTower.svg      svg/WhiteTower.svg        \
+           svg/BlackDragon.svg     svg/WhiteDragon.svg       \
+           svg/BlackCub.svg        svg/WhiteCub.svg          \
+           svg/BlackButterfly.svg   svg/WhiteButterfly.svg    \
+           svg/BlackLeft.svg       svg/WhiteLeft.svg         \
+           svg/BlackRight.svg      svg/WhiteRight.svg        \
+           svg/BlackHat.svg        svg/WhiteHat.svg          \
+           svg/BlackRShield.svg            svg/WhiteRShield.svg      \
+           svg/BlackLShield.svg            svg/WhiteLShield.svg      \
+           svg/BlackAxe.svg        svg/WhiteAxe.svg          \
+           svg/BlackFlag.svg       svg/WhiteFlag.svg         \
+           svg/BlackDuck.svg       svg/WhiteDuck.svg         \
+           svg/BlackPegasus.svg            svg/WhitePegasus.svg      \
            svg/eo_Analyzing.svg     svg/eo_Black.svg          \
            svg/eo_Clear.svg         svg/eo_Ponder.svg         \
            svg/eo_Thinking.svg      svg/eo_Unknown.svg        \
@@ -189,7 +210,7 @@ dist_pixmaps_DATA = pixmaps/cross32.png pixmaps/cross48.png pixmaps/board32.png
 ### directory and files for pngs
 
 pngdir = $(gamedatadir)/themes/textures
-dist_png_DATA = png/hatch.png png/wood_d.png png/wood_l.png png/xqboard.png
+dist_png_DATA = png/hatch.png png/wood_d.png png/wood_l.png png/xqboard-9x10.png
 
 ### directory and files for sound files
 
@@ -244,30 +265,26 @@ endif
 
 if OSX_APP
 osxapp: all-recursive install install-recursive
+macportsprefix = $(shell which port | sed s/[/]bin[/]port//)
        $(MKDIR_P) $(datarootdir)/bin
        $(MKDIR_P) $(datarootdir)/lib
        $(MKDIR_P) $(sysconfdir)/gtk-2.0
-       $(MKDIR_P) $(sysconfdir)/pango
        $(MKDIR_P) $(datadir)/themes
+       $(MKDIR_P) $(datadir)/gtk-engines
        $(MKDIR_P) $(gamedatadir)/themes
        $(INSTALL) ./osxapp/Info.plist $(prefix)
        $(INSTALL) ./osxapp/PkgInfo $(prefix)
        $(INSTALL) ./osxapp/XBoard.gtklauncher $(bindir)/XBoard
        $(INSTALL) ./xboard $(bindir)/xboard-bin
        cp -R ./osxapp/icons/. $(datarootdir)
-       $(INSTALL) ./osxapp/man.command    $(datarootdir)/bin/man.command
-       $(INSTALL) ./osxapp/info.command   $(datarootdir)/bin/info.command
        sed -e 's?-soundProgram "aplay -q"?-soundProgram "afplay"?'\
             -e 's?-firstChessProgram fairymax?-firstChessProgram "./fairymax"?'\
            -e 's?-firstChessProgramNames {fairymax?-firstChessProgramNames {"fairymax" -fcp "./fairymax" -fd "~~/../../bin/fairymax"?'\
            -e 's?"Fruit 2.1" -fcp fruit -fUCI?"fruit" -fcp "./fruit" -fd "~~/../../bin/fruit" -fUCI?'\
            -e '/"Crafty" -fcp crafty/d'\
            -e '/"GNU Chess" -fcp gnuchess/d'\
-           -e 's?-polyglotDir ""?-polyglotDir "~~/../../bin"?'\
-           -e 's?polyglot ?./polyglot ?'\
-           -e 's?-icsNames {"fics" -icshost freechess.org -icshelper timeseal?-icsNames {"fics" -icshost 69.36.243.188 -icshelper ~~/../../bin/timeseal?'\
-           -e 's?"icc" -icshost chessclub.com -icshelper timestamp?"icc" -icshost 207.99.83.228 -icshelper ~~/../../bin/timestamp?'\
-           -e 's?"kc" -icshost alanimus.com -icshelper timeseal?"vics" -icshost winboard.nl -icshelper ~~/../../bin/timeseal?'\
+           -e 's?"icc" -icshost chessclub.com -icshelper timestamp?"icc" -icshost 207.99.83.228 -icshelper timestamp?'\
+           -e 's?"kc" -icshost alanimus.com -icshelper timeseal?"vics" -icshost winboard.nl -icshelper timeseal?'\
            -e '/; Save user settings./d'\
            -e '/; Must be last in file to make user options prevail over system-wide settings!/d'\
            -e '/-saveSettingsOnExit true/d'\
@@ -280,38 +297,43 @@ osxapp: all-recursive install install-recursive
        echo '-autoLogo true' >>$(sysconfdir)/xboard.conf
        echo '-logoDir "~~/logos"' >>$(sysconfdir)/xboard.conf
        echo '-logoSize 100' >>$(sysconfdir)/xboard.conf
-       echo '-openCommand "cd %s/../../bin; open"' >>$(sysconfdir)/xboard.conf
+       echo '-openCommand "open"' >>$(sysconfdir)/xboard.conf
        echo '-firstDirectory "~~/../../bin/fairymax"' >>$(sysconfdir)/xboard.conf
        echo '-secondDirectory "~~/../../bin/fairymax"' >>$(sysconfdir)/xboard.conf
        echo '-secondChessProgram "./fairymax"' >>$(sysconfdir)/xboard.conf
+       echo '-uxiAdapter "uci2wb -%variant %fcp %fd"' >>$(sysconfdir)/xboard.conf
        echo ';' >>$(sysconfdir)/xboard.conf
        echo '; Save user settings.' >>$(sysconfdir)/xboard.conf
        echo '; Must be last in file to make user options prevail over system-wide settings!' >>$(sysconfdir)/xboard.conf
        echo ';' >>$(sysconfdir)/xboard.conf
        echo '-saveSettingsOnExit true' >>$(sysconfdir)/xboard.conf
-       echo '-saveSettingsFile "~/Library/Preferences/XBoardOSX.conf"' >>$(sysconfdir)/xboard.conf
-       echo '-settingsFile "~/Library/Preferences/XBoardOSX.conf"' >>$(sysconfdir)/xboard.conf
+       echo '-saveSettingsFile "~/Library/Preferences/XBoard.conf"' >>$(sysconfdir)/xboard.conf
+       echo '-settingsFile "~/Library/Preferences/XBoard.conf"' >>$(sysconfdir)/xboard.conf
 
-       sed 's?/opt/local/lib?/tmp/skl/XBoard.app/Contents/Resources/lib?' </opt/local/etc/gtk-2.0/gdk-pixbuf.loaders >$(sysconfdir)/gtk-2.0/gdk-pixbuf.loaders
-       sed -e 's?/opt/local/lib?/tmp/skl/XBoard.app/Contents/Resources/lib?' -e 's?/opt/local/share/locale?/tmp/skl/XBoard.app/Contents/Resources/share/locale?' </opt/local/etc/gtk-2.0/gtk.immodules >$(sysconfdir)/gtk-2.0/gtk.immodules
+       sed 's?$(macportsprefix)/lib?/tmp/skl/XBoard.app/Contents/Resources/lib?' <$(macportsprefix)/etc/gtk-2.0/gdk-pixbuf.loaders >$(sysconfdir)/gtk-2.0/gdk-pixbuf.loaders
+       sed -e 's?$(macportsprefix)/lib?/tmp/skl/XBoard.app/Contents/Resources/lib?' -e 's?$(macportsprefix)/share/locale?/tmp/skl/XBoard.app/Contents/Resources/share/locale?' <$(macportsprefix)/etc/gtk-2.0/gtk.immodules >$(sysconfdir)/gtk-2.0/gtk.immodules
        $(INSTALL) ./osxapp/launcher_rc $(datarootdir)/
-       $(INSTALL) /opt/local/etc/gtk-2.0/im-multipress.conf $(sysconfdir)/gtk-2.0
+       $(INSTALL) $(macportsprefix)/etc/gtk-2.0/im-multipress.conf $(sysconfdir)/gtk-2.0
        $(INSTALL) ./osxapp/gtkrc $(sysconfdir)/gtk-2.0/gtkrc
-       $(INSTALL) ./osxapp/pango.modules $(sysconfdir)/pango/pangorc
-       cp -R /opt/local/lib/gtk-2.0 $(datarootdir)/lib
-       cp -R /opt/local/lib/gdk-pixbuf-2.0 $(datarootdir)/lib
-       cp -R /opt/local/share/themes/Mac $(datadir)/themes
-       cp -R ./osxapp/default/. $(gamedatadir)/themes/default
+       cp -R $(macportsprefix)/lib/gtk-2.0 $(datarootdir)/lib
+       cp -R $(macportsprefix)/lib/gdk-pixbuf-2.0 $(datarootdir)/lib
+       cp -R $(macportsprefix)/share/themes/Mac $(datadir)/themes
+       cp -R ./osxapp/gtk2-themes/Mac/gtk-2.0 $(datadir)/themes/Mac
+       cp -R ./osxapp/themes/default/. $(gamedatadir)/themes/default
+       cp $(macportsprefix)/share/gtk-engines/murrine.xml $(datadir)/gtk-engines/murrine.xml
        $(INSTALL) ./png/marble_d.png $(gamedatadir)/themes/textures
        $(INSTALL) ./png/marble_l.png $(gamedatadir)/themes/textures
-       $(INSTALL) ./png/xqwood.png $(gamedatadir)/themes/textures
+       $(INSTALL) ./png/xqwood-9x10.png $(gamedatadir)/themes/textures
        cp -R ./osxapp/logos $(gamedatadir)/
-       cp -R ./osxapp/osx-localization/. $(datarootdir)/
-       for i in po/*gmo; do lang=`basename $$i .gmo`; $(INSTALL) /opt/local/share/locale/$$lang/LC_MESSAGES/gtk20.mo $(localedir)/$$lang/LC_MESSAGES/; done
+if NLS_ENABLED
+       cp -R $(macportsprefix)/share/strings/. $(datarootdir)/
+       for i in po/*gmo; do lang=`basename $$i .gmo`; $(INSTALL) $(macportsprefix)/share/locale/$$lang/LC_MESSAGES/gtk20.mo $(localedir)/$$lang/LC_MESSAGES/; done
+endif
        dylibbundler -of -b -x $(bindir)/xboard-bin -d $(datarootdir)/lib -p @executable_path/../Resources/lib
        dylibbundler -of -b -x $(datarootdir)/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so -d $(datarootdir)/lib -p @executable_path/../Resources/lib
        dylibbundler -of -b -x $(datarootdir)/lib/gtk-2.0/2.10.0/immodules/im-quartz.so -d $(datarootdir)/lib -p @executable_path/../Resources/lib
        dylibbundler -of -b -x $(datarootdir)/lib/gtk-2.0/2.10.0/engines/libpixmap.so -d $(datarootdir)/lib -p @executable_path/../Resources/lib
+       dylibbundler -of -b -x $(datarootdir)/lib/gtk-2.0/2.10.0/engines/libmurrine.so -d $(datarootdir)/lib -p @executable_path/../Resources/lib
        find ./XBoard.app -name '*.a' -print0 | xargs -0 rm
        rm -r $(datarootdir)/lib/gtk-2.0/include
        rm -r $(datarootdir)/share/applications