grim/guifications3

Parents b903d52a73c2
Children 418cfa0646a9
we make it to 18% now... figured out the gf_enum.[ch] and gf_marshallers.[ch] building problems... now I need to figureout how to make i18n work with cmake...
--- a/gflib/CMakeLists.txt Sat Mar 20 16:27:47 2010 -0500
+++ b/gflib/CMakeLists.txt Sat Mar 20 18:55:24 2010 -0500
@@ -3,7 +3,7 @@
###############################################################################
# basics
###############################################################################
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.6)
include(FindPkgConfig)
@@ -12,6 +12,12 @@
###############################################################################
project(gflib)
+include_directories(gflib
+ ${CMAKE_SOURCE_DIR}
+ ${GLIB_INCLUDE_DIRS}
+ ${GMODULE_INCLUDE_DIRS}
+)
+
set(GFLIB_MAJOR_VERSION 0)
set(GFLIB_MINOR_VERSION 0)
set(GFLIB_MICRO_VERSION 1)
--- a/gflib/autogen.sh Sat Mar 20 16:27:47 2010 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-#!/bin/sh
-# Guifications - The end-all, be-all notification framework
-# Copyright (C) 2003-2009 Gary Kramlich <grim@reaperworld.com>
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-PACKAGE="gflib"
-
-# we source this without a path because we always want to use the in tree copy
-. ./gflib-autogen.sh
-
-add_default_library_commands
-
-autogen
-
--- a/gflib/gflib-autogen.sh Sat Mar 20 16:27:47 2010 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,362 +0,0 @@
-#!/bin/sh
-# Guifications - The end-all, be-all notification framework
-# Copyright (C) 2003-2009 Gary Kramlich <grim@reaperworld.com>
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-###############################################################################
-# Globals
-###############################################################################
-SEQ_COMMAND="seq"
-
-###############################################################################
-# A list library similar to the lists in TCL
-# Copyright (C) 2009 Ethan Blanton
-# Heavily modified by Gary Kramlich
-###############################################################################
-linsert() {
- __list=${1}
- __index=${2}
- shift 2
- __item=${@}
-
- # dirty hack to make sure we handle empty item. Basically we just turn
- # them into a space
- if [ -z "${__item}" ] ; then
- __item=" "
- fi
-
- eval "${__list}=\`catlist ${__list} | sed -e '${__index}i\\\\
-${__item}'\`"
-}
-
-lappend() {
- __list=${1}
- shift
- __item=${@}
-
- # dirty hack to make sure we handle empty item. Basically we just turn
- # them into a space
- if [ -z "${__item}" ] ; then
- __item=" "
- fi
-
- if lempty ${__list} ; then
- eval "${__list}='${__item}'"
- else
- __index=`llength ${__list}`
-
- eval "${__list}=\"\`catlist ${__list}\`
-${__item}\""
- fi
-}
-
-lreplace() {
- __list=${1}
- __index=${2}
- shift 2
- __item=${@}
-
- # dirty hack to make sure we handle empty item. Basically we just turn
- # them into a space
- if [ -z "${__item}" ] ; then
- __item=" "
- fi
-
- eval "${__list}=\`catlist ${__list} | sed -e '${__index},${__index}c\\\\
-${__item}'\`"
-}
-
-lindex() {
- eval __list=\$$1
- cat <<EOF | sed -e "$2!d"
-$__list
-EOF
-}
-
-lempty() {
- eval test -z \"\$$1\"
-}
-
-llength() {
- eval __list=\$$1
- cat <<EOF | wc -l
-$__list
-EOF
-}
-
-lrange() {
- catlist $1 | sed -e "$2,$3!d"
-}
-
-catlist() {
- eval __list=\$$1
- cat <<EOF
-$__list
-EOF
-}
-
-debuglist() {
- i=1
- catlist $1 | while read ITEM; do
- echo $1[$i] ${ITEM}
- i=$(( ${i} + 1 ))
- done
-}
-
-lsearch() {
- catlist $1 | sed -n "/$2/{
-=
-q
-}"
-}
-
-###############################################################################
-# Some helper functions
-###############################################################################
-add_command () {
- __cmd=${1}
- shift
- __flags=${@}
-
- lappend COMMANDS ${__cmd}
- lappend FLAGS ${__flags}
-}
-
-insert_command () {
- __insert=${1}
- __cmd=${2}
- shift 2
- __flags=${@}
-
- __index=`lsearch COMMANDS ${__insert}`
- linsert COMMANDS ${__index} ${__cmd}
- linsert FLAGS ${__index} ${__flags}
-}
-
-update_command () {
- __old_command=$1
- __new_command=$2
- shift 2
- __flags=${@}
-
- __index=`lsearch COMMANDS ${__old_command}`
- test ${__index} -ne 0 || return
-
- lreplace COMMANDS ${__index} ${__new_command}
-
- test -z "${__flags}" || lreplace FLAGS ${__index} ${__flags}
-}
-
-check_config_file() {
- test "${ARGS_FILE}" || ARGS_FILE="autogen.args"
-
- printf "checking for argument file %s: " ${ARGS_FILE}
-
- if test -f ${ARGS_FILE} ; then
- echo "found."
-
- printf "sourcing %s ... " ${ARGS_FILE}
-
- # dash will only source a file from a source file if it's in the path
- # so we add . to the PATH for the source and then revert the path back
- # to what it was.
- __old_path=${PATH}
- PATH=".:${PATH}"
- . ${ARGS_FILE}
- PATH="${__old_path}"
-
- echo "done."
- else
- echo "not found."
- fi
-}
-
-check_command () {
- __cmd=$1
-
- printf "checking for ${__cmd}... "
- __bin=`which ${__cmd}`
-
- if [ x"${__bin}" = x"" ] ; then
- echo "not found."
- echo "${__cmd} is required to build ${PACKAGE}!"
- exit 1;
- fi
-
- echo "${__bin}"
-}
-
-check_commands () {
- catlist COMMANDS | while read __cmd; do
- check_command ${__cmd}
- done
-}
-
-run_command () {
- __cmd=$1
- shift
-
- # we need to make sure to use a six-character template because some versions
- # of mktemp blow up on anything shorter or longer.
- __output=`mktemp autogen-XXXXXX`
-
- # we have to stash ${@} into a variable, otherwise printf has "issues" if
- # ${@} was expanded from a variable. Fortunately, this lets us clean up
- # the output a bit too.
- __args="${@}"
- if [ x"${__args}" != x"" ] ; then
- ARGS=" ${__args}"
- fi
-
- __display=${__cmd}
- if [ -n "${__args}" ] ; then
- __display="${__display} ${__args}"
- fi
-
- printf "running '${__display}' ... "
- ${__cmd} ${__args} >${__output} 2>&1
-
- if [ $? != 0 ] ; then
- echo "failed."
- cat ${__output}
- rm -f ${__output}
- exit 1
- else
- echo "done."
- cat ${__output}
-
- rm -f ${__output}
- fi
-}
-
-run_commands () {
- __len=`llength COMMANDS`
-
- for i in `${SEQ_COMMAND} 1 ${__len}` ; do
- __cmd=`lindex COMMANDS ${i}`
- __flags=`lindex FLAGS ${i}`
-
- run_command ${__cmd} ${__flags}
- done
-}
-
-run_configure () {
- echo "running configure ${@}..."
- ./configure ${CONFIGURE_FLAGS} "${@}"
-}
-
-add_default_commands () {
- add_command libtoolize -c -f --automake
- add_command intltoolize -c -f --automake
- add_command aclocal
- add_command autoheader
- add_command automake -a -c -f --gnu
- add_command autoconf -f
-}
-
-add_default_library_commands () {
- add_default_commands
-
- # gtkdocize needs be to run before aclocal, so we insert it before aclocal
- insert_command aclocal gtkdocize --copy
-}
-
-find_command () {
- echo `lsearch COMMANDS ${1}`
-}
-
-cleanup () {
- rm -f autogen-??????
- echo
- exit 2
-}
-
-###############################################################################
-# Platform specific stuff
-###############################################################################
-platform_bsd () {
- SEQ_COMMAND="jot -"
-}
-
-platform_darwin () {
- # run the bsd platform specific stuff too
- platform_bsd
-
- # change libtoolize to glibtoolize
- update_command libtoolize glibtoolize
-
- __flags=""
-
- # look for fink and add it's aclocal dir to the aclocal flags
- if [ -d /sw/share/aclocal ] ; then
- __flags="${__flags} -I /sw/share/aclocal"
- fi
-
- # look for macports and add it's aclocal dir to the aclocal flags
- if [ -d /opt/local/share/aclocal ] ; then
- __flags="${__flags} -I /opt/local/share/aclocal"
- fi
-
- update_command aclocal aclocal ${__flags}
-}
-
-check_platform () {
- __platform=$(uname -s)
-
- printf "adjusting for platform '%s' ... " ${__platform}
-
- case ${__platform} in
- *BSD*)
- platform_bsd
- ;;
- Darwin*)
- platform_darwin
- ;;
- esac
-
- echo "done."
-}
-
-###############################################################################
-# API
-###############################################################################
-autogen() {
- # add our cleanup trap
- trap cleanup 2
-
- FIGLET=`which figlet`
- if [ x"${FIGLET}" != x"" ] ; then
- ${FIGLET} ${PACKAGE}
- echo "build system is being generated"
- else
- echo "autogenerating build system for '${PACKAGE}'"
- fi
-
- check_config_file
-
- check_platform
-
- check_commands
- test $? != 0 && exit -1
-
- run_commands
- test $? != 0 && exit -1
-
- # remove our cleanup trap
- trap - 2
-
- run_configure "${@}"
-}
-
--- a/gflib/gflib/CMakeLists.txt Sat Mar 20 16:27:47 2010 -0500
+++ b/gflib/gflib/CMakeLists.txt Sat Mar 20 18:55:24 2010 -0500
@@ -1,11 +1,43 @@
# vi:syntax=cmake
-execute_process(
- COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=glib_genmarshal glib-2.0
- OUTPUT_VARIABLE GLIB_GENMARSHAL
+set(GFLIB_HEADERS
+ gf_client.h
+ gf_client_connection.h
+ gf_connection.h
+ gf_connection_manager.h
+ gf_console_logger.h
+ gf_core.h
+ gf_enum.h
+ gf_event.h
+ gf_event_info.h
+ gf_feed.h
+ gf_feed_manager.h
+ gf_file_logger.h
+ gf_filesystem.h
+ gf_hash.h
+ gf_image.h
+ gf_log.h
+ gf_logger.h
+ gf_marshallers.h
+ gf_named_object.h
+ gf_native_plugin.h
+ gf_native_plugin_loader.h
+ gf_object.h
+ gf_plugin.h
+ gf_plugin_info.h
+ gf_plugin_loader.h
+ gf_plugin_manager.h
+ gf_preference.h
+ gf_preference_engine.h
+ gf_preference_engine_null.h
+ gf_preference_engine_xml.h
+ gf_preferences.h
+ gf_preferences_proxy.h
+ gf_preferences_proxy_entry.h
+ gf_server_connection.h
+ gf_type.h
)
-
set(ENUM_HEADERS
gf_connection.h
gf_log.h
@@ -24,19 +56,27 @@
)
add_custom_command(
+ OUTPUT gf_enum.h
+ DEPENDS ${ENUM_HEADERS}
+ COMMAND ${GLIB_MKENUMS} --template gf_enum.h.template ${ENUM_HEADERS} > gf_enum.h
+)
+
+add_custom_command(
OUTPUT gf_enum.c
- DEPENDS ${ENUM_HEADERS} ${GLIB_MKENUMS}
- VERBATIM
+ DEPENDS ${ENUM_HEADERS} gf_enum.h
COMMAND ${GLIB_MKENUMS} --template gf_enum.c.template ${ENUM_HEADERS} > gf_enum.c
)
-message( fucker is ${GLIB_GENMARSHAL})
+add_custom_command(
+ OUTPUT gf_marshallers.h
+ DEPENDS gf_marshallers.list
+ COMMAND ${GLIB_GENMARSHAL} --header --prefix=gf_marshal gf_marshallers.list > gf_marshallers.h
+)
add_custom_command(
OUTPUT gf_marshallers.c
- DEPENDS ${GLIB_GENMARSHAL} gf_marshallers.list
- COMMAND ${GLIB_GENMARSHAL}
- --body --prefix=gf_marshal gf_marshallers.list
+ DEPENDS gf_marshallers.list gf_marshallers.h
+ COMMAND ${GLIB_GENMARSHAL} --body --prefix=gf_marshal gf_marshallers.list > gf_marshallers.c
)
add_custom_command(