[gnome-icon-theme/new-build-system] Bring back a proper build system and theme generation
- From: Rodney Dawes <dobey src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-icon-theme/new-build-system] Bring back a proper build system and theme generation
- Date: Sun, 3 Jan 2010 22:46:16 +0000 (UTC)
commit 7a734d51716428f97e82b1ae8aa7a8b9bda64ef5
Author: Rodney Dawes <dobey gnome org>
Date: Sun Jan 3 17:32:56 2010 -0500
Bring back a proper build system and theme generation
.gitignore | 18 ++
build/AUTHORS => AUTHORS | 0
build/COPYING => COPYING | 0
Makefile.am | 101 ++++++++++
build/README => README | 0
autogen.sh | 23 ++-
build/INSTALL | 234 ----------------------
build/MAINTAINERS | 7 -
build/Makefile.am | 30 ---
build/NEWS | 483 ----------------------------------------------
build/autogen.sh | 21 --
build/configure.ac | 32 ---
configure.ac | 80 ++++++++
create-icon-theme.sh | 97 ---------
index.theme.in.in | 24 +++
po/POTFILES.in | 17 +--
render-icon-theme.rb | 49 -----
src/Makefile.am | 49 +++++
18 files changed, 295 insertions(+), 970 deletions(-)
---
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..5c17045
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,18 @@
+Makefile
+Makefile.in
+Makefile.in.in
+POTFILES
+aclocal.m4
+autom4te.cache
+configure
+config.*
+index.theme
+install-sh
+missing
+stamp-it
+
+*.tar.bz2
+*.tar.gz
+*.gmo
+.intltool-merge-cache
+
diff --git a/build/AUTHORS b/AUTHORS
similarity index 100%
rename from build/AUTHORS
rename to AUTHORS
diff --git a/build/COPYING b/COPYING
similarity index 100%
rename from build/COPYING
rename to COPYING
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..26fd5d8
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,101 @@
+DISTCHECK_CONFIGURE_FLAGS = --disable-icon-mapping
+
+SUBDIRS = po $(SVGSRCDIR)
+
+theme_in_files = index.theme.in.in
+theme_DATA = $(theme_in_files:.theme.in.in=.theme)
+
+THEME_DIRS=$(shell SIZES="$(render_sizes)"; for size in $$SIZES; do for dir in `find $(srcdir)/$(SVGOUTDIR)/$$size/* -type d`; do printf "$$dir,"; done; done | sed -e "s/,$$//g")
+
+render: Makefile
+ ($(am__cd) $(SVGSRCDIR) && $(MAKE) $(AM_MAKEFLAGS) render) \
+ || eval `exit 1`
+
+%.theme.in: %.theme.in.in $(SVGOUTDIR) Makefile
+ dirs="`echo $(THEME_DIRS) | sed -e 's#$(srcdir)/gnome/##g'`"; \
+ sed -e "s|\ THEME_DIRS\@|$$dirs|g" < $< > $@; \
+ for dir in `echo $$dirs | sed -e "s/,/ /g"`; do \
+ sizefull="`dirname $$dir`"; \
+ size="`echo $$sizefull | sed -e 's/x.*$$//g'`"; \
+ context="`basename $$dir`"; \
+ echo "[$$dir]" >> $@; \
+ if test "$$context" = "actions"; then \
+ echo "Context=Actions" >> $@; \
+ fi; \
+ if test "$$context" = "animations"; then \
+ echo "Context=Animations" >> $@; \
+ fi; \
+ if test "$$context" = "apps"; then \
+ echo "Context=Applications" >> $@; \
+ fi; \
+ if test "$$context" = "categories"; then \
+ echo "Context=Categories" >> $@; \
+ fi; \
+ if test "$$context" = "devices"; then \
+ echo "Context=Devices" >> $@; \
+ fi; \
+ if test "$$context" = "emblems"; then \
+ echo "Context=Emblems" >> $@; \
+ fi; \
+ if test "$$context" = "emotes"; then \
+ echo "Context=Emotes" >> $@; \
+ fi; \
+ if test "$$context" = "intl"; then \
+ echo "Context=International" >> $@; \
+ fi; \
+ if test "$$context" = "mimetypes"; then \
+ echo "Context=MimeTypes" >> $@; \
+ fi; \
+ if test "$$context" = "places"; then \
+ echo "Context=Places" >> $@; \
+ fi; \
+ if test "$$context" = "status"; then \
+ echo "Context=Status" >> $@; \
+ fi; \
+ echo "Size=$$size" >> $@; \
+ if test "$$size" = "256"; then \
+ echo "MinSize=56" >> $@; \
+ echo "MaxSize=512" >> $@; \
+ echo "Type=Scalable" >> $@; \
+ else \
+ echo "Type=Fixed" >> $@; \
+ fi; \
+ echo "" >> $@; \
+ done
+
+ INTLTOOL_THEME_RULE@
+
+# we don't want to install mo files, all translations are already stored
+# in theme files
+install-data-local:
+ $(MAKE) -C po uninstall
+ if [ -h $(DESTDIR)$(themedir) ]; then \
+ rm -f $(DESTDIR)$(themedir); \
+ fi
+ if [ -d $(DESTDIR)$(themedir) ]; then \
+ touch $(DESTDIR)$(themedir); \
+ fi
+
+EXTRA_DIST = \
+ gnome \
+ $(theme_in_files)
+
+CLEANFILES = \
+ $(theme_DATA)
+
+MAINTAINERCLEANFILES = \
+ Makefile.in \
+ aclocal.m4 \
+ config.guess \
+ config.h.in \
+ config.sub \
+ configure \
+ depcomp \
+ install-sh \
+ intltool-*.in \
+ libtool \
+ ltmain.sh \
+ missing \
+ mkinstalldirs \
+ po/Makefile.in.in \
+ po/$(GETTEXT_PACKAGE).pot
diff --git a/build/README b/README
similarity index 100%
rename from build/README
rename to README
diff --git a/autogen.sh b/autogen.sh
index b264d2a..cd7b2b4 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,3 +1,22 @@
#!/bin/sh
-./create-icon-theme.sh gnome
-./output/gnome/autogen.sh $@
+# Run this to generate all the initial makefiles, etc.
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+PKG_NAME="gnome-icon-theme"
+REQUIRED_AUTOMAKE_VERSION=1.9
+
+(test -f $srcdir/configure.ac \
+ && test -f $srcdir/index.theme.in.in \
+ && test -d $srcdir/src) || {
+ echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
+ echo " top-level $PKG_NAME directory"
+ exit 1
+}
+
+which gnome-autogen.sh || {
+ echo "You need to install gnome-common from the GNOME CVS"
+ exit 1
+}
+USE_GNOME2_MACROS=1 . gnome-autogen.sh
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..9839c3d
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,80 @@
+dnl Process this file with autoconf to produce a configure script.
+AC_PREREQ(2.53)
+
+AC_INIT([gnome-icon-theme], [2.29.0],
+ [http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-icon-theme])
+AC_CONFIG_SRCDIR([index.theme.in.in])
+
+AM_INIT_AUTOMAKE([1.9 tar-ustar foreign])
+
+PKG_PROG_PKG_CONFIG([0.19])
+IT_PROG_INTLTOOL([0.40.0])
+
+GETTEXT_PACKAGE="${PACKAGE}"
+AC_SUBST(GETTEXT_PACKAGE)
+localedir='$(prefix)/$(DATADIRNAME)/locale'
+AC_SUBST(localedir)
+
+# Workaround to make aclocal get the right flags
+AC_SUBST(ACLOCAL_AMFLAGS, "\${ACLOCAL_FLAGS}")
+
+# Define the toplevel path here
+AC_SUBST(themedir, "\${datadir}/icons/gnome")
+
+# Input and Output dirs for the rendering
+AC_SUBST(SVGSRCDIR, "src")
+AC_SUBST(SVGOUTDIR, "gnome")
+
+# Icon sizes we want to install
+AC_SUBST([render_sizes], ["8x8 16x16 22x22 32x32 48x48 256x256"])
+
+# Allow icon mapping to be disabled
+AC_ARG_ENABLE([icon-mapping],
+ AC_HELP_STRING([--enable-icon-mapping],
+ [Enable compatibility symlinks [default=auto]]),
+ [enable_mapping=$enableval],
+ [enable_mapping=yes])
+
+ICONMAP="true"
+if test "x$enable_mapping" != "xno"; then
+ UTILS_REQUIRED=0.8.7
+
+ AC_MSG_CHECKING([icon-naming-utils >= $UTILS_REQUIRED])
+ PKG_CHECK_EXISTS(icon-naming-utils >= $UTILS_REQUIRED,
+ have_utils=yes, have_utils=no)
+ if test "x$have_utils" = "xyes"; then
+ UTILS_PATH="`$PKG_CONFIG --variable=program_path icon-naming-utils`"
+ ICONMAP="$UTILS_PATH/icon-name-mapping"
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ AC_MSG_ERROR([icon-naming-utils >= $UTILS_REQUIRED is required to build
+ and install gnome-icon-theme])
+ fi
+fi
+AC_SUBST(ICONMAP)
+
+# need git, icontool, and inkscape for rendering
+allow_rendering=yes
+AC_PATH_PROG([GIT], [git], [false])
+if test "x$GIT" = "xfalse"; then
+ allow_rendering=no
+fi
+AC_PATH_PROG([ICONTOOL_RENDER], [icontool-render], [false])
+if test "x$ICONTOOL_RENDER" = "xfalse"; then
+ allow_rendering=no
+fi
+AC_PATH_PROG([INKSCAPE], [inkscape], [false])
+if test "x$INKSCAPE" = "xfalse"; then
+ allow_rendering=no
+fi
+AM_CONDITIONAL(ALLOW_RENDERING, test "x$allow_rendering" = "xyes")
+
+
+AC_CONFIG_FILES([
+Makefile
+po/Makefile.in
+src/Makefile
+])
+
+AC_OUTPUT
diff --git a/index.theme.in.in b/index.theme.in.in
new file mode 100644
index 0000000..892f06d
--- /dev/null
+++ b/index.theme.in.in
@@ -0,0 +1,24 @@
+[Icon Theme]
+_Name=GNOME
+_Comment=Default GNOME Theme
+Example=start-here
+
+# KDE Specific Stuff
+DisplayDepth=32
+LinkOverlay=link_overlay
+LockOverlay=lock_overlay
+ZipOverlay=zip_overlay
+DesktopDefault=48
+DesktopSizes=16,22,32,48,64,72,96,128
+ToolbarDefault=22
+ToolbarSizes=16,22,32,48
+MainToolbarDefault=22
+MainToolbarSizes=16,22,32,48
+SmallDefault=16
+SmallSizes=16
+PanelDefault=32
+PanelSizes=16,22,32,48,64,72,96,128
+
+# Directory list
+Directories= THEME_DIRS@
+
diff --git a/po/POTFILES.in b/po/POTFILES.in
index ad4b7e5..44c5fa2 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,17 +1,4 @@
# List of source files containing translatable strings.
# Please keep this file sorted alphabetically.
-[type: gettext/ini] index.theme.in
-[type: gettext/ini] scalable/emblems/emblem-desktop.icon.in
-[type: gettext/ini] scalable/emblems/emblem-documents.icon.in
-[type: gettext/ini] scalable/emblems/emblem-downloads.icon.in
-[type: gettext/ini] scalable/emblems/emblem-favorite.icon.in
-[type: gettext/ini] scalable/emblems/emblem-generic.icon.in
-[type: gettext/ini] scalable/emblems/emblem-important.icon.in
-[type: gettext/ini] scalable/emblems/emblem-mail.icon.in
-[type: gettext/ini] scalable/emblems/emblem-new.icon.in
-[type: gettext/ini] scalable/emblems/emblem-package.icon.in
-[type: gettext/ini] scalable/emblems/emblem-photos.icon.in
-[type: gettext/ini] scalable/emblems/emblem-readonly.icon.in
-[type: gettext/ini] scalable/emblems/emblem-unreadable.icon.in
-[type: gettext/ini] scalable/emblems/emblem-urgent.icon.in
-[type: gettext/ini] scalable/emblems/emblem-web.icon.in
+[type: gettext/ini] index.theme.in.in
+
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..2dd5749
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,49 @@
+
+icon_in_files = $(shell SRCDIR="$(srcdir)"; for i in `find $$SRCDIR -name "*.svg"`; do printf "$$i "; done)
+icon_files = $(shell for i in `find $(top_builddir)/$(SVGOUTDIR) -name "*.png"`; do printf "$$i"; done)
+
+if ALLOW_RENDERING
+render-png: $(icon_in_files) Makefile
+ for file in $(icon_in_files); do \
+ for size in $(render_sizes); do \
+ $(ICONTOOL_RENDER) -s $$size -o $(top_builddir)/$(SVGOUTDIR) $$file >/dev/null; \
+ done; \
+ done
+
+else
+render-png: $(icon_in_files) Makefile
+ cp -a $(top_srcdir)/$(SVGOUTDIR) $(top_builddir)/$(SVGOUTDIR)
+
+endif
+
+$(render_sizes): Makefile
+
+render: render-png
+
+install-data-local:
+ for size in $(render_sizes); do \
+ for dir in `if [ -d $(top_srcdir)/$(SVGOUTDIR)/$$size ]; then find $(top_srcdir)/$(SVGOUTDIR)/$$size/* -type d; fi`; do \
+ for file in $(icon_files); do \
+ context="`dirname $$file`"; \
+ $(mkdir_p) $(DESTDIR)$(themedir)/$$size/$$context; \
+ $(install_sh_DATA) $(top_srcdir)/$(SVGOUTDIR)/$$size/$$file $(DESTDIR)$(themedir)/$$size/$$file; \
+ done; \
+ done; \
+ done
+
+uninstall-local:
+ for size in $(render_sizes); do \
+ for dir in `if [ -d $(top_srcdir)/$(SVGOUTDIR)/$$size ]; then find $(top_srcdir)/$(SVGOUTDIR)/$$size/* -type d; fi`; do \
+ for file in $(icon_files); do \
+ rm -f $(DESTDIR)$(themedir)/$$size/$$file; \
+ done; \
+ done; \
+ done
+
+EXTRA_DIST = \
+ $(icon_in_files)
+
+
+MAINTAINERCLEANFILES = \
+ Makefile.in \
+ $(icon_cache)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]