From 85720f0d1afab5f870bc63ff83eaa9a5ab68ed6e Mon Sep 17 00:00:00 2001 From: Doug Torrance Date: Thu, 11 Dec 2014 09:18:12 -0600 Subject: [PATCH] wmclock: Switch build system from deprecated imake to autotools. --- wmclock/Imakefile | 87 -------------------------------------------- wmclock/Makefile.am | 7 ++++ wmclock/configure | 74 ------------------------------------- wmclock/configure.ac | 9 +++++ 4 files changed, 16 insertions(+), 161 deletions(-) delete mode 100644 wmclock/Imakefile create mode 100644 wmclock/Makefile.am delete mode 100755 wmclock/configure create mode 100644 wmclock/configure.ac diff --git a/wmclock/Imakefile b/wmclock/Imakefile deleted file mode 100644 index 98e385d..0000000 --- a/wmclock/Imakefile +++ /dev/null @@ -1,87 +0,0 @@ -NAME = wmclock -VERSION = 1.0.14 -DATE = 2010-Dec-22 - -DEFINES = -DVERSION=\"$(VERSION)\" -CFLAGS += -Wall -pedantic -Wshadow -Wmissing-prototypes -Wcast-align -CFLAGS += -Wcast-qual -Wchar-subscripts -Wpointer-arith -CFLAGS += -Wredundant-decls -Wstrict-prototypes - -XPMLIB = -L$(PREFIX)/lib/X11 -lXpm -DEPLIBS = $(DEPXLIB) - -LOCAL_LIBRARIES = $(XPMLIB) $(XLIB) - -LINTLIBS = $(LINTXLIB) - -SHAREDIR = $(PREFIX)/share/$(NAME) - -IMAKEFILE = Imakefile -MAKEFILE = Makefile - -CHANGELOG = ChangeLog - -SPEC_SRC = $(NAME).spec.in -SPEC_OBJ = $(NAME).spec -SPECS = $(SPEC_SRC) $(SPEC_OBJ) - -EXTRA_FILES = \@@\ - $(SPECS) \@@\ - $(IMAKEFILE) \@@\ - $(CHANGELOG) \@@\ - COPYING \@@\ - INSTALL \@@\ - README \@@\ - configure - -MANSRC = wmclock.man.in -MANOBJ = wmclock.man - -SYMLINKS = month.xpm weekday.xpm - -HDRS = dynlist.h -SRCS = dynlist.c wmclock.c -OBJS = dynlist.o wmclock.o - -TARDIR = $(NAME)-$(VERSION) -TARBALL = $(TARDIR).tar.gz - -ComplexProgramTarget($(NAME)) - -depend:: - cat $(MANSRC) |sed \@@\ - -e 's/@VERSION@/$(VERSION)/g' \@@\ - -e 's/@DATE@/$(DATE)/g' \@@\ - >$(MANOBJ) - -.PHONY: depends tar - -spec: $(SPEC_OBJ) - -$(SPEC_OBJ): $(SPEC_SRC) $(IMAKEFILE) - cat $(SPEC_SRC) |sed -e 's/@VERSION@/$(VERSION)/g' >$@ - -install.share:: - @if [ -d $(DESTDIR)$(SHAREDIR) ]; then set +x; \@@\ - else (set -x; $(MKDIRHIER) $(DESTDIR)$(SHAREDIR)); fi - @set -x; \@@\ - for i in lang.*; do \@@\ - $(MKDIRHIER) $(DESTDIR)$(SHAREDIR)/$${i}; \@@\ - $(INSTALL) $(INSTALLFLAGS) $(INSTDATFLAGS) ./$${i}//**/* \@@\ - $(DESTDIR)$(SHAREDIR)/$${i}/; \@@\ - done - -tar: $(TARBALL) - -$(TARBALL): $(EXTRA_FILES) $(EXTRA_DIRS) $(MANSRC) $(HDRS) $(SRCS) - $(RM) -r $(TARDIR) - $(MKDIRHIER) $(TARDIR) - $(CP) -p $(EXTRA_FILES) $(MANSRC) $(HDRS) $(SRCS) $(TARDIR)/ - -for i in $(EXTRA_DIRS); do \@@\ - $(MKDIRHIER) $(TARDIR)/$${i}; \@@\ - $(CP) -p $${i}//**/* $(TARDIR)/$${i}/; \@@\ - done >/dev/null 2>&1 - chmod -Rc ug+rwX,o+rX,o-w $(TARDIR) - tar -cvf - $(TARDIR) |gzip -9 >$(TARBALL) - $(RM) -r $(TARDIR) - diff --git a/wmclock/Makefile.am b/wmclock/Makefile.am new file mode 100644 index 0000000..f3a9e55 --- /dev/null +++ b/wmclock/Makefile.am @@ -0,0 +1,7 @@ +bin_PROGRAMS = wmclock +wmclock_SOURCES = dynlist.c dynlist.h wmclock.c month.xpm weekday.xpm \ + xpm/date.xpm xpm/led.xpm xpm/mask.xbm xpm/mask.xbm +AM_CFLAGS = $(x11_CFLAGS) $(xpm_CFLAGS) $(xext_CFLAGS) +LIBS += $(x11_LIBS) $(xpm_LIBS) $(xext_LIBS) +dist_man_MANS = wmclock.man +nobase_dist_pkgdata_DATA = lang.*/*.xpm diff --git a/wmclock/configure b/wmclock/configure deleted file mode 100755 index 4453d42..0000000 --- a/wmclock/configure +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/sh -# -# configure: prepare wmclock to be built using imake and make -# created 1999-Mar-30 03:40 jmk - -DefLanguage=english -Language='' -LangDir='' -Me=`basename $0` - -GetLanguages() { - ls -1d lang.* | awk -F . '{ - print " " $2 - }' -} - -PrintHelp() { - langlist="`GetLanguages`" - cat <] - - Options: - --lang - Configure wmclock to use day and month names for the specified - language. Defaults to 'english'. Choices are: - -${langlist} -EOF -} - -Die() { - echo "$*" - echo "wmclock is NOT successfully configured!" - exit 1 -} - -while [ $# -gt 0 ]; do - case "$1" in - --lang|--language) - shift - Language="$1" - ;; - --help) - PrintHelp - exit 1 - ;; - esac - shift -done - -if [ -z "${Language}" ]; then - Language="${DefLanguage}" -fi - -LangDir="lang.${Language}" -if [ ! -d "${LangDir}" ]; then - Die "${Me}: error: cannot find language directory '${LangDir}'" -fi - -echo "Configuring for ${Language} day-of-week and month names ..." -rm -f month.xpm weekday.xpm -ln -s "./${LangDir}/month.xpm" . -ln -s "./${LangDir}/weekday.xpm" . - -echo "Building Makefile from Imakefile ..." -echo "----------------------------------------------------------------" -xmkmf -a - -echo "----------------------------------------------------------------" -echo "Finished configuring. To build wmclock, type 'make'." -echo - -exit 0 diff --git a/wmclock/configure.ac b/wmclock/configure.ac new file mode 100644 index 0000000..9e3a682 --- /dev/null +++ b/wmclock/configure.ac @@ -0,0 +1,9 @@ +AC_INIT([wmclock], [1.0.14]) +AM_INIT_AUTOMAKE([foreign subdir-objects]) +AC_CONFIG_SRCDIR([configure.ac]) +AC_PROG_CC +PKG_CHECK_MODULES([x11], [x11]) +PKG_CHECK_MODULES([xpm], [xpm]) +PKG_CHECK_MODULES([xext], [xext]) +AC_CONFIG_FILES([Makefile wmclock.man]) +AC_OUTPUT