Permalink
Browse files

Switch to libraries versioned by release (-release instead of -versio…

…n-info).

Eliminate libpluginloading.la as not necessary anymore.
Activate C99 in the compiler, and stop checking for Objective C.

--HG--
rename : pluginloading/pluginloading.c => fontforge/pluginloading.c
  • Loading branch information...
1 parent 4191269 commit 67a604da0f60404697af53c9cba1ff8faafdba50 Barry Schwartz committed Sep 5, 2012
View
@@ -16,14 +16,13 @@ EXTRA_LTLIBRARIES =
include libltdl/Makefile.inc
SUBDIRS = inc
-SUBDIRS += pluginloading
-SUBDIRS += plugins
SUBDIRS += Unicode gutils
if GRAPHICAL_USER_INTERFACE
SUBDIRS += gdraw
endif GRAPHICAL_USER_INTERFACE
+SUBDIRS += plugins
SUBDIRS += fontforge po htdocs pycontrib
SUBDIRS += $(subdirs)
SUBDIRS += tests
View
@@ -1,7 +1,3 @@
-GUNI_VERSION = 4
-GUNI_REVISION = 0
-GUNI_AGE = 0
-
lib_LTLIBRARIES = libgunicode.la
libgunicode_la_SOURCES = ArabicForms.c alphabet.c backtrns.c char.c \
@@ -11,5 +7,6 @@ libgunicode_la_SOURCES = ArabicForms.c alphabet.c backtrns.c char.c \
libgunicode_la_CPPFLAGS = "-I$(top_builddir)/inc" \
"-I$(top_srcdir)/inc" $(MY_CFLAGS)
-libgunicode_la_LDFLAGS = $(MY_CFLAGS) $(MY_LIBS) -version-info \
- "$(GUNI_VERSION):$(GUNI_REVISION):$(GUNI_AGE)"
+# Using -release instead of -version-info seems appropriate in the
+# absence of a well defined ABI.
+libgunicode_la_LDFLAGS = $(MY_CFLAGS) $(MY_LIBS) -release $(VERSION)
View
@@ -33,6 +33,11 @@ AC_SUBST([MACAPP])
FONTFORGE_PLATFORM_SPECIFICS
+VERSION_MAJOR=`AS_ECHO(["${PACKAGE_VERSION}"]) | sed -e 's/^\([[0-9]][[0-9]]*\).*/\1/'`
+VERSION_MINOR=`AS_ECHO(["${PACKAGE_VERSION}"]) | sed -e 's/^[[0-9]][[0-9]]*\.\([[0-9]][[0-9]]*\).*/\1/'`
+AC_SUBST([VERSION_MAJOR])
+AC_SUBST([VERSION_MINOR])
+
#--------------------------------------------------------------------------
#
# URLs for dependencies.
@@ -61,10 +66,10 @@ libtiff_url="http://en.wikipedia.org/wiki/Libtiff"
AC_PROG_AWK
AC_PROG_CC
+AC_PROG_CC_C99
AM_PROG_CC_C_O
AC_PROG_CPP
AC_PROG_CXX
-AC_PROG_OBJC
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
@@ -249,7 +254,8 @@ AC_CHECK_FUNC([tzset],[:],[AC_DEFINE([_NO_TZSET],1,[Define if not using tzset.])
#--------------------------------------------------------------------------
-AM_CONDITIONAL([GRAPHICAL_USER_INTERFACE],[test x"${i_do_have_x}" = xyes])
+i_do_have_gui="${i_do_have_x}"
+AM_CONDITIONAL([GRAPHICAL_USER_INTERFACE],[test x"${i_do_have_gui}" = xyes])
AM_CONDITIONAL([MACINTOSH],[test x"${gww_ismac}" = xyes])
FONTFORGE_SET_MY_CFLAGS
View
@@ -12,8 +12,8 @@ ifeq (@THE_PROGRAMS@,yes)
# Run "make stamps-for-release" with GNU Make before doing a release. #
#######################################################################
stamps-for-release: stamper $(LIBFFSTAMP_H_DEPENDS) $(STAMP_C_DEPENDS)
- ./stamper$(EXEEXT) > $(srcdir)/stamp.c
- ./stamper$(EXEEXT) -l > $(srcdir)/libffstamp.h
+ $(builddir)/stamper$(EXEEXT) > $(srcdir)/stamp.c
+ $(builddir)/stamper$(EXEEXT) -l > $(srcdir)/libffstamp.h
noinst_PROGRAMS = stamper
stamper_SOURCES = stamper.c
View
@@ -1,11 +1,5 @@
#--------------------------------------------------------------------------
-FF_VERSION = 2
-FF_REVISION = 0
-FF_AGE = 0
-
-#--------------------------------------------------------------------------
-
if THE_PROGRAMS
bin_PROGRAMS = fontforge
@@ -39,8 +33,8 @@ sfddiff: sfddiff.pe
chmod +x sfddiff
.pre.c:
- $(SED) -e '1,$$ s/REPLACE_ME_WITH_MAJOR_VERSION/$(FF_VERSION)/' \
- -e '1,$$ s/REPLACE_ME_WITH_MINOR_VERSION/$(FF_REVISION)/' \
+ $(SED) -e '1,$$ s/REPLACE_ME_WITH_MAJOR_VERSION/$(VERSION_MAJOR)/' \
+ -e '1,$$ s/REPLACE_ME_WITH_MINOR_VERSION/$(VERSION_MINOR)/' \
< $< > $@
#--------------------------------------------------------------------------
@@ -87,7 +81,7 @@ libfontforge_la_SOURCES = asmfpst.c autohint.c autosave.c autotrace.c \
tottfaat.c tottfgpos.c tottf.c tottfvar.c ttfinstrs.c \
ttfspecial.c ufo.c unicoderange.c utils.c winfonts.c zapfnomen.c \
groups.c langfreq.c ftdelta.c autowidth2.c woff.c stamp.c \
- activeinui.c is_LIGATURE.c
+ activeinui.c pluginloading.c is_LIGATURE.c
nodist_libfontforge_la_SOURCES = libstamp.c
EXTRA_libfontforge_la_SOURCES = splinerefigure.c
@@ -96,10 +90,9 @@ libfontforge_la_CPPFLAGS = "-I$(top_builddir)/inc" \
"-DDOCDIR=\"${docdir}\"" "-DPLUGINDIR=\"${pkglibdir}/plugins\"" \
$(MY_CFLAGS)
-libfontforge_la_LIBADD = splinerefigure.lo \
- $(top_builddir)/pluginloading/libfontforgepluginloading.la \
- $(top_builddir)/Unicode/libgunicode.la \
- $(top_builddir)/gutils/libgutils.la \
+libfontforge_la_LIBADD = splinerefigure.lo \
+ $(top_builddir)/Unicode/libgunicode.la \
+ $(top_builddir)/gutils/libgutils.la \
$(top_builddir)/gutils/libgioftp.la
if GRAPHICAL_USER_INTERFACE
@@ -111,8 +104,9 @@ if PLUGIN_GB12345
libfontforge_la_LIBADD += -dlopen $(top_builddir)/plugins/gb12345.la
endif PLUGIN_GB12345
-libfontforge_la_LDFLAGS = $(MY_CFLAGS) $(MY_LIBS) -version-info \
- "$(FF_VERSION):$(FF_REVISION):$(FF_AGE)"
+# Using -release instead of -version-info seems appropriate in the
+# absence of a well defined ABI.
+libfontforge_la_LDFLAGS = $(MY_CFLAGS) $(MY_LIBS) -release $(VERSION)
EXTRA_SCRIPTS = generate_codepoint_selector.py
@@ -156,8 +150,10 @@ nodist_libfontforgeexe_la_SOURCES = exelibstamp.c
libfontforgeexe_la_CPPFLAGS = $(libfontforge_la_CPPFLAGS)
libfontforgeexe_la_LIBADD = libfontforge.la $(LTDLDEPS)
-libfontforgeexe_la_LDFLAGS = $(MY_CFLAGS) $(MY_LIBS) -version-info \
- "$(FF_VERSION):$(FF_REVISION):$(FF_AGE)"
+
+# Using -release instead of -version-info seems appropriate in the
+# absence of a well defined ABI.
+libfontforgeexe_la_LDFLAGS = $(MY_CFLAGS) $(MY_LIBS) -release $(VERSION)
#--------------------------------------------------------------------------
View
@@ -1,3 +1,3 @@
-#define LibFF_ModTime 1343746639L /* Seconds since 1970 (standard unix time) */
-#define LibFF_ModTime_Str "14:57 GMT 31-Jul-2012"
-#define LibFF_VersionDate 20120731
+#define LibFF_ModTime 1346784630L /* Seconds since 1970 (standard unix time) */
+#define LibFF_ModTime_Str "18:50 GMT 4-Sep-2012"
+#define LibFF_VersionDate 20120904 /* Year, month, day */
File renamed without changes.
View
@@ -1,5 +1,5 @@
#include <time.h>
-const time_t source_modtime = 1343746639L;
-const char *source_modtime_str = "14:57 GMT 31-Jul-2012";
-const char *source_version_str = "20120731";
+const time_t source_modtime = 1346784630L;
+const char *source_modtime_str = "18:50 GMT 4-Sep-2012";
+const char *source_version_str = "20120904";
View
@@ -1,7 +1,3 @@
-GD_VERSION = 5
-GD_REVISION = 0
-GD_AGE = 0
-
lib_LTLIBRARIES = libgdraw.la
libgdraw_la_SOURCES = choosericons.c ctlvalues.c drawboxborder.c \
@@ -23,5 +19,7 @@ libgdraw_la_CPPFLAGS = "-I$(top_builddir)/inc" "-I$(top_srcdir)/inc" \
libgdraw_la_LIBADD = $(top_builddir)/Unicode/libgunicode.la \
$(top_builddir)/gutils/libgutils.la
-libgdraw_la_LDFLAGS = $(MY_CFLAGS) $(MY_LIBS) -version-info \
- "$(GD_VERSION):$(GD_REVISION):$(GD_AGE)"
+# Using -release instead of -version-info seems appropriate in the
+# absence of a well defined ABI.
+libgdraw_la_LDFLAGS = $(MY_CFLAGS) $(MY_LIBS) -release $(VERSION)
+
View
@@ -2,10 +2,6 @@ lib_LTLIBRARIES = libgutils.la libgioftp.la
#--------------------------------------------------------------------------
-GUTL_VERSION = 2
-GUTL_REVISION = 0
-GUTL_AGE = 0
-
libgutils_la_SOURCES = divisors.c fsys.c gcol.c gimage.c \
gimagereadbmp.c gimageread.c gimagereadgif.c gimagereadjpeg.c \
gimagereadpng.c gimagereadras.c gimagereadrgb.c gimagereadtiff.c \
@@ -18,23 +14,20 @@ libgutils_la_SOURCES = divisors.c fsys.c gcol.c gimage.c \
libgutils_la_CPPFLAGS = "-I$(top_builddir)/inc" "-I$(top_srcdir)/inc" \
$(MY_CFLAGS)
-libgutils_la_LIBADD = \
- $(top_builddir)/pluginloading/libfontforgepluginloading.la \
- $(top_builddir)/Unicode/libgunicode.la
+libgutils_la_LIBADD = $(top_builddir)/Unicode/libgunicode.la
-libgutils_la_LDFLAGS = $(MY_CFLAGS) $(MY_LIBS) -version-info \
- "$(GUTL_VERSION):$(GUTL_REVISION):$(GUTL_AGE)"
+# Using -release instead of -version-info seems appropriate in the
+# absence of a well defined ABI.
+libgutils_la_LDFLAGS = $(MY_CFLAGS) $(MY_LIBS) -release $(VERSION)
#--------------------------------------------------------------------------
-GFTP_VERSION = 2
-GFTP_REVISION = 0
-GFTP_AGE = 0
-
libgioftp_la_SOURCES = gioftp.c gioftpP.h
libgioftp_la_CPPFLAGS = "-I$(top_builddir)/inc" "-I$(top_srcdir)/inc" \
$(MY_CFLAGS)
-libgioftp_la_LDFLAGS = $(MY_CFLAGS) $(MY_LIBS) -version-info \
- "$(GFTP_VERSION):$(GFTP_REVISION):$(GFTP_AGE)"
+
+# Using -release instead of -version-info seems appropriate in the
+# absence of a well defined ABI.
+libgioftp_la_LDFLAGS = $(MY_CFLAGS) $(MY_LIBS) -release $(VERSION)
#--------------------------------------------------------------------------
View
@@ -1,3 +1,7 @@
+# FIXME: The installed headers need to be reworked for better system
+# installation. In particular, they ought to have <> instead of "" and
+# they should require a "fontforge/" prefix.
+
pkginclude_HEADERS = basics.h chardata.h charset.h config.h dynamic.h \
fileutil.h gdraw.h gfile.h ggadget.h gicons.h gimage.h gio.h \
gkeysym.h gprogress.h gresedit.h gresource.h gwidget.h gwwiconv.h \
View
@@ -9,6 +9,9 @@ localedir=@localedir@
Name: libfontforge
Description: a font manipulation library.
-Version: @VERSION@
-Libs: -L${libdir} -lfontforge
+Version: @LIBFONTFORGE_PKGCONFIG_VERSION@
+Requires: @LIBFONTFORGE_PKGCONFIG_REQUIRES@
+Requires.private: @LIBFONTFORGE_PKGCONFIG_REQUIRES_PRIVATE@
+Libs: @LIBFONTFORGE_PKGCONFIG_LIBS@
+Libs.private: @LIBFONTFORGE_PKGCONFIG_LIBS_PRIVATE@
Cflags: -I${includedir}/fontforge
View
@@ -9,6 +9,9 @@ localedir=@localedir@
Name: libfontforgeexe
Description: for embedding the FontForge UI in a program.
-Version: @VERSION@
-Libs: -L${libdir} -lfontforgeexe
+Version: @LIBFONTFORGEEXE_PKGCONFIG_VERSION@
+Requires: @LIBFONTFORGEEXE_PKGCONFIG_REQUIRES@
+Requires.private: @LIBFONTFORGEEXE_PKGCONFIG_REQUIRES_PRIVATE@
+Libs: @LIBFONTFORGEEXE_PKGCONFIG_LIBS@
+Libs.private: @LIBFONTFORGEEXE_PKGCONFIG_LIBS_PRIVATE@
Cflags: -I${includedir}/fontforge
@@ -7,7 +7,6 @@ AC_DEFUN([FONTFORGE_CREATE_MAKEFILES],
# Portable makefiles.
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([inc/Makefile])
-AC_CONFIG_FILES([pluginloading/Makefile])
AC_CONFIG_FILES([Unicode/Makefile])
AC_CONFIG_FILES([gutils/Makefile])
AC_CONFIG_FILES([gdraw/Makefile])
@@ -4,9 +4,49 @@ dnl FONTFORGE_CREATE_PKGCONFIG_FILES
dnl --------------------------------
AC_DEFUN([FONTFORGE_CREATE_PKGCONFIG_FILES],
[
-# FIXME: Make these take account of dependencies, at least to aid
-# building programs with static libraries, in the absence of libtool
-# archive files.
+# Pkg-config does not like having letters in the version. We will just
+# strip off "alpha", "beta", "pre", or similar designations. (We could
+# consider adding subminor/patchlevel, though.)
+__cleaned_version="${VERSION_MAJOR}.${VERSION_MINOR}"
+
+__pkg_deps=""
+test x"${i_do_have_python_scripting}" = xyes && __pkg_deps="${__pkg_deps} python-${PYTHON_VERSION}"
+test x"${i_do_have_libpng}" = xyes && __pkg_deps="${__pkg_deps} libpng"
+test x"${i_do_have_libtiff}" = xyes && __pkg_deps="${__pkg_deps} libtiff-4"
+test x"${i_do_have_libxml}" = xyes && __pkg_deps="${__pkg_deps} libxml-2.0"
+test x"${i_do_have_libunicodenames}" = xyes && __pkg_deps="${__pkg_deps} libunicodenames"
+test x"${i_do_have_cairo}" = xyes && __pkg_deps="${__pkg_deps} cairo"
+test x"${i_do_have_pango}" = xyes && __pkg_deps="${__pkg_deps} pango"
+test x"${i_do_have_pango}" = xyes -a x"${i_do_have_cairo}" = xyes && my_libs="${my_libs} pangocairo"
+test x"${i_do_have_pango}" = xyes && my_libs="${my_libs} pangoxft"
+test x"${i_do_have_freetype}" = xyes && __pkg_deps="${__pkg_deps} freetype2"
+__pkg_deps="${__pkg_deps} zlib"
+
+__private_deps=""
+test x"${i_do_have_gui}" = xyes && __private_deps="${__private_deps} -lgdraw"
+__private_deps="${__private_deps} -lgioftp"
+__private_deps="${__private_deps} -lgutils"
+__private_deps="${__private_deps} -lgunicode"
+test x"${i_do_have_giflib}" = xyes && __private_deps="${__private_deps} ${GIFLIB_LIBS}"
+test x"${i_do_have_libjpeg}" = xyes && __private_deps="${__private_deps} ${LIBJPEG_LIBS}"
+test x"${i_do_have_libspiro}" = xyes && __private_deps="${__private_deps} ${LIBSPIRO_LIBS}"
+test x"${i_do_have_x}" = xyes && __private_deps="${__private_deps} ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
+__private_deps="${__private_deps} ${PTHREAD_LIBS}"
+__private_deps="${__private_deps} ${LIBLTDL}"
+__private_deps="${__private_deps} ${LIBS}"
+
+AC_SUBST([LIBFONTFORGE_PKGCONFIG_VERSION],["${__cleaned_version}"])
+AC_SUBST([LIBFONTFORGE_PKGCONFIG_REQUIRES],[])
+AC_SUBST([LIBFONTFORGE_PKGCONFIG_REQUIRES_PRIVATE],["${__pkg_deps}"])
+AC_SUBST([LIBFONTFORGE_PKGCONFIG_LIBS],["-L${libdir} -lfontforge"])
+AC_SUBST([LIBFONTFORGE_PKGCONFIG_LIBS_PRIVATE],["${__private_deps}"])
+
+AC_SUBST([LIBFONTFORGEEXE_PKGCONFIG_VERSION],["${__cleaned_version}"])
+AC_SUBST([LIBFONTFORGEEXE_PKGCONFIG_REQUIRES],["libfontforge"])
+AC_SUBST([LIBFONTFORGEEXE_PKGCONFIG_REQUIRES_PRIVATE],["${__pkg_deps}"])
+AC_SUBST([LIBFONTFORGEEXE_PKGCONFIG_LIBS],["-L${libdir} -lfontforgeexe"])
+AC_SUBST([LIBFONTFORGEEXE_PKGCONFIG_LIBS_PRIVATE],["-L${libdir} ${__private_deps}"])
+
AC_CONFIG_FILES([libfontforge.pc])
AC_CONFIG_FILES([libfontforgeexe.pc])
])
View
@@ -1,15 +0,0 @@
-PL_VERSION = 1
-PL_REVISION = 0
-PL_AGE = 0
-
-lib_LTLIBRARIES = libfontforgepluginloading.la
-
-libfontforgepluginloading_la_SOURCES = pluginloading.c
-
-libfontforgepluginloading_la_CPPFLAGS = "-I$(top_builddir)/inc" \
- "-I$(top_srcdir)/inc" "-DPLUGINDIR=\"${pkglibdir}/plugins\"" \
- $(MY_CFLAGS)
-
-libfontforgepluginloading_la_LDFLAGS = $(MY_CFLAGS) $(MY_LIBS) \
- -version-info "$(PL_VERSION):$(PL_REVISION):$(PL_AGE)"
-

0 comments on commit 67a604d

Please sign in to comment.