Compare commits

..

12 Commits

Author SHA1 Message Date
Slávek Banko cea19afda9
Update version number for R14.0.8 final release.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
6 years ago
TDE Gitea 7fb4342121 Reset submodule main/dependencies/libart-lgpl/cmake to latest HEAD 6 years ago
TDE Gitea 248ee754c9 Reset submodule main/dependencies/libart-lgpl/cmake to latest HEAD 6 years ago
TDE Gitea 3369be170f Reset submodule main/dependencies/libart-lgpl/cmake to latest HEAD 6 years ago
TDE Gitea 0a95e80702 Reset submodule main/dependencies/libart-lgpl/cmake to latest HEAD 6 years ago
TDE Gitea c4942a6a59 Reset submodule main/dependencies/libart-lgpl/cmake to latest HEAD 6 years ago
Slávek Banko 7f058ae278
cmake: Add tests.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 11cb023db2)
7 years ago
Slávek Banko b314a5b4a8
Add support for GCC hidden visibility.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 2a50894a43)
7 years ago
Slávek Banko db23722ddb
Move the art_config.h generation to the configure script.
Cleanup of generated automake files.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 87237501c5)
7 years ago
gregory guy 32fc564b71
conversion to the cmake building system
Cleanup of generated headers.
Add common cmake submodule.

Signed-off-by: gregory guy <g-gregory@gmx.fr>
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit b996d3d1de)
7 years ago
Slávek Banko b72d215669
Use pkg-config to get values in libart2-config.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 7c59d8ccd2)
7 years ago
Timothy Pearson e041d2bbeb Minor update to AUTHORS file
(cherry picked from commit d5cb41f44a)
10 years ago

3
.gitmodules vendored

@ -0,0 +1,3 @@
[submodule "cmake"]
path = cmake
url = https://system@scm.trinitydesktop.org/scm/git/tde-common-cmake

@ -7,16 +7,13 @@
############################################
##### set project version ########################
include( TDEVersion )
cmake_minimum_required( VERSION ${TDE_CMAKE_MINIMUM_VERSION} )
tde_set_project_version( )
cmake_minimum_required( VERSION 2.8 )
#### general package setup
project( libart-lgpl )
set( VERSION R14.0.8 )
set( LIBART_VERSION 2.3.21 )
string( REPLACE "." ";" LIBART_VERSION_LIST ${LIBART_VERSION} )
@ -36,6 +33,7 @@ include( CheckCSourceCompiles )
#### include our cmake modules
set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
include( TDEMacros )
@ -48,13 +46,13 @@ enable_testing( )
##### optional stuff
option( WITH_ALL_OPTIONS "Enable all optional support" OFF )
option( WITH_ALL_OPTIONS "Enable all optional support" OFF )
option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} )
##### user requested modules
option( BUILD_ALL "Build all" ON )
option( BUILD_ALL "Build all" ON )
option( BUILD_DOC "Build documentation" ${BUILD_ALL} )
@ -72,12 +70,171 @@ set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined"
set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" )
##### directories
add_subdirectory( src )
tde_conditional_add_subdirectory( BUILD_DOC doc )
##### write configure files
configure_file( config.h.cmake config.h @ONLY )
configure_file( art_config.h.in art_config.h @ONLY )
configure_file( libart-features.h.in libart-features.h @ONLY )
include_directories(
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
)
##### art_lgpl_2
set( _SRCS art_affine.c art_alphagamma.c
art_bpath.c art_gray_svp.c
art_misc.c art_pixbuf.c
art_rect.c art_rect_svp.c
art_rect_uta.c art_render.c
art_render_gradient.c art_render_mask.c
art_render_svp.c art_rgb.c
art_rgb_affine.c art_rgb_affine_private.c
art_rgb_bitmap_affine.c art_rgb_pixbuf_affine.c
art_rgb_rgba_affine.c art_rgb_a_affine.c
art_rgba.c art_rgb_svp.c
art_svp.c art_svp_intersect.c
art_svp_ops.c art_svp_point.c
art_svp_render_aa.c art_svp_vpath.c
art_svp_vpath_stroke.c art_svp_wind.c
art_uta.c art_uta_ops.c
art_uta_rect.c art_uta_vpath.c
art_uta_svp.c art_vpath.c
art_vpath_bpath.c art_vpath_dash.c
art_vpath_svp.c libart-features.c
)
## shared
tde_add_library( art_lgpl_2 SHARED
SOURCES
${_SRCS}
LINK
m
VERSION ${LIBART_VERSION}
DESTINATION ${LIB_INSTALL_DIR}
)
## static
tde_add_library( art_lgpl_2 STATIC_PIC
SOURCES
${_SRCS}
LINK
m
VERSION ${LIBART_VERSION}
DESTINATION ${LIB_INSTALL_DIR}
)
## tests
tde_add_check_executable( testart
SOURCES
testart.c
LINK
art_lgpl_2-shared
m
)
add_test(
NAME testart-testpat
COMMAND testart testpat
)
#-- the testart-gradient often ends at sigsegv
#add_test(
# NAME testart-gradient
# COMMAND testart gradient
#)
add_test(
NAME testart-dash
COMMAND testart dash
)
add_test(
NAME testart-dist
COMMAND testart dist
)
add_test(
NAME testart-intersect
COMMAND testart intersect
)
tde_add_check_executable( testuta
SOURCES
testuta.c
LINK
art_lgpl_2-shared
m
TEST
)
##### Headers
set( _headers art_affine.h art_alphagamma.h
art_bpath.h
art_filterlevel.h art_gray_svp.h
art_misc.h art_pathcode.h art_pixbuf.h
art_point.h art_rect.h art_rect_svp.h
art_rect_uta.h art_render.h
art_render_gradient.h art_render_mask.h
art_render_svp.h art_rgb.h
art_rgb_affine.h art_rgb_bitmap_affine.h
art_rgb_pixbuf_affine.h art_rgb_rgba_affine.h
art_rgb_a_affine.h art_rgb_svp.h
art_rgba.h art_svp.h
art_svp_intersect.h art_svp_ops.h
art_svp_point.h art_svp_render_aa.h
art_svp_vpath.h art_svp_vpath_stroke.h
art_svp_wind.h art_uta.h
art_uta_ops.h art_uta_rect.h
art_uta_vpath.h art_uta_svp.h
art_vpath.h art_vpath_bpath.h
art_vpath_dash.h art_vpath_svp.h
libart.h
${CMAKE_CURRENT_BINARY_DIR}/art_config.h
${CMAKE_CURRENT_BINARY_DIR}/libart-features.h
)
install(
FILES ${_headers}
DESTINATION ${INCLUDE_INSTALL_DIR}/libart-2.0/libart_lgpl
)
#### pkg-config
set( prefix ${CMAKE_INSTALL_PREFIX} )
string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" exec_prefix ${EXEC_INSTALL_PREFIX} )
string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" includedir ${INCLUDE_INSTALL_DIR} )
string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" libdir ${LIB_INSTALL_DIR} )
configure_file( libart-2.0.pc.in libart-2.0.pc @ONLY )
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/libart-2.0.pc
DESTINATION ${PKGCONFIG_INSTALL_DIR}
)
install(
PROGRAMS libart2-config
DESTINATION ${BIN_INSTALL_DIR}
)
##### man page
tde_conditional_add_subdirectory( BUILD_DOC doc )

@ -50,8 +50,3 @@ else( )
tde_message_fatal( "sizeof(int) != 4 and sizeof(long) != 4" )
endif( )
endif( )
##### check for the math libc
find_library( MATH_LIBC m )

@ -1,11 +0,0 @@
Basic Installation
==================
libart-lgpl relies on cmake to build.
Here are suggested default options:
-DCMAKE_SKIP_RPATH="OFF" \
-DCMAKE_VERBOSE_MAKEFILE="ON" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DWITH_ALL_OPTIONS="ON"

@ -0,0 +1,168 @@
noinst_PROGRAMS = testart testuta
bin_SCRIPTS = \
libart2-config
BUILT_SOURCES = art_config.h libart-features.h
EXTRA_DIST = \
libart.def \
libart-2.0.pc.in \
libart-2.0-uninstalled.pc.in
lib_LTLIBRARIES = libart_lgpl_2.la
if PLATFORM_WIN32
no_undefined = -no-undefined
endif
if OS_WIN32
export_symbols = -export-symbols libart.def
install-libtool-import-lib:
$(INSTALL) .libs/libart_lgpl_2.dll.a $(DESTDIR)$(libdir)
uninstall-libtool-import-lib:
-rm $(DESTDIR)$(libdir)/libart_lgpl_2.dll.a
else
install-libtool-import-lib:
uninstall-libtool-import-lib:
libm = -lm
endif
if MS_LIB_AVAILABLE
noinst_DATA = art_lgpl_2.lib
install-ms-lib:
$(INSTALL) art_lgpl_2.lib $(DESTDIR)$(libdir)
uninstall-ms-lib:
-rm $(DESTDIR)$(libdir)/art_lgpl_2.lib
art_lgpl_2.lib : libart_lgpl_2.la
lib -name:libart_lgpl_2-@LIBART_MAJOR_VERSION@.dll -def:libart.def -out:$@
else
install-ms-lib:
uninstall-ms-lib:
endif
libart_lgpl_2_la_SOURCES = \
art_affine.c \
art_alphagamma.c \
art_bpath.c \
art_gray_svp.c \
art_misc.c \
art_pixbuf.c \
art_rect.c \
art_rect_svp.c \
art_rect_uta.c \
art_render.c \
art_render_gradient.c \
art_render_mask.c \
art_render_svp.c \
art_rgb.c \
art_rgb_affine.c \
art_rgb_affine_private.c \
art_rgb_affine_private.h \
art_rgb_bitmap_affine.c \
art_rgb_pixbuf_affine.c \
art_rgb_rgba_affine.c \
art_rgb_a_affine.c \
art_rgba.c \
art_rgb_svp.c \
art_svp.c \
art_svp_intersect.c \
art_svp_ops.c \
art_svp_point.c \
art_svp_render_aa.c \
art_svp_vpath.c \
art_svp_vpath_stroke.c \
art_svp_wind.c \
art_uta.c \
art_uta_ops.c \
art_uta_rect.c \
art_uta_vpath.c \
art_uta_svp.c \
art_vpath.c \
art_vpath_bpath.c \
art_vpath_dash.c \
art_vpath_svp.c \
libart-features.c
libart_lgpl_2_la_LDFLAGS = -version-info @LIBART_VERSION_INFO@ $(no_undefined) $(export_symbols)
libart_lgpl_2_la_LIBADD = $(libm)
libart_lgplincdir = $(includedir)/libart-2.0/libart_lgpl
libart_lgplinc_HEADERS = \
art_affine.h \
art_alphagamma.h \
art_bpath.h \
art_config.h \
art_filterlevel.h \
art_gray_svp.h \
art_misc.h \
art_pathcode.h \
art_pixbuf.h \
art_point.h \
art_rect.h \
art_rect_svp.h \
art_rect_uta.h \
art_render.h \
art_render_gradient.h \
art_render_mask.h \
art_render_svp.h \
art_rgb.h \
art_rgb_affine.h \
art_rgb_bitmap_affine.h \
art_rgb_pixbuf_affine.h \
art_rgb_rgba_affine.h \
art_rgb_a_affine.h \
art_rgb_svp.h \
art_rgba.h \
art_svp.h \
art_svp_intersect.h \
art_svp_ops.h \
art_svp_point.h \
art_svp_render_aa.h \
art_svp_vpath.h \
art_svp_vpath_stroke.h \
art_svp_wind.h \
art_uta.h \
art_uta_ops.h \
art_uta_rect.h \
art_uta_vpath.h \
art_uta_svp.h \
art_vpath.h \
art_vpath_bpath.h \
art_vpath_dash.h \
art_vpath_svp.h \
libart.h \
libart-features.h
INCLUDES = -I$(top_srcdir) -I$(top_builddir) -DLIBART_COMPILATION
DEPS = $(top_builddir)/libart_lgpl_2.la
LDADDS = $(top_builddir)/libart_lgpl_2.la
testart_SOURCES=testart.c
testart_LDFLAGS =
testart_DEPENDENCIES = $(DEPS)
testart_LDADD = $(LDADDS) $(libm)
testuta_SOURCES=testuta.c
testuta_LDFLAGS =
testuta_DEPENDENCIES = $(DEPS)
testuta_LDADD = $(LDADDS) $(libm)
tests: testart testuta
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libart-2.0.pc
install-data-local: install-ms-lib install-libtool-import-lib
uninstall-local: uninstall-ms-lib uninstall-libtool-import-lib
CLEANFILES = $(BUILT_SOURCES) $(bin_SCRIPTS)
DISTCLEANFILES = $(BUILT_SOURCES) $(bin_SCRIPTS)

@ -1,15 +1,21 @@
This is the LGPL'd component of libart. All functions needed for
running the Gnome canvas, and for printing support, will be going in
here. The GPL'd component will be getting various enhanced functions
for specific applications.
libart-lgpl - a 2D graphics library
Libart is free software. It is also for sale. For information about
licensing libart, please contact Raph Levien
<raph@acm.org>. Contributions to the codebase are also very welcome,
but the copyright must be assigned in writing to preserve the
licensing flexibility.
Libart-lgpl is a library of functions for 2D graphics supporting a
superset of the PostScript imaging model, designed to be integrated with
graphics, artwork and illustration programs.
It is written in optimized C and is fully compatible with C++.
With a small footprint of 10,000 lines of code, it is especially suitable
for embedded applications.
For more information about libart, see the web page:
http://www.levien.com/libart/
There's also a libart tutorial available at
http://www.gnome.org/~mathieu/libart/libart.html
======================================================================
@ -25,24 +31,3 @@ above, as patch copyright has NOT been transferred to the original
author and we have no plans to do so.
======================================================================
For more information about libart, see the web page:
http://www.levien.com/libart/
There's also a libart tutorial available at
http://www.gnome.org/~mathieu/libart/libart.html
CONTRIBUTING
==============
If you wish to contribute to libart-lgpl, you might do so:
- TDE Gitea Workspace (TGW) collaboration tool.
https://mirror.git.trinitydesktop.org/gitea
- TDE Weblate Translation Workspace (TWTW) collaboration tool.
https://mirror.git.trinitydesktop.org/weblate

@ -11,7 +11,7 @@ typedef @ART_U8_TYPE@ art_u8;
typedef @ART_U16_TYPE@ art_u16;
typedef @ART_U32_TYPE@ art_u32;
#if defined(__TDE_HAVE_GCC_VISIBILITY) || defined(G_HAVE_GCC_VISIBILITY)
#if defined(__KDE_HAVE_GCC_VISIBILITY) || defined(G_HAVE_GCC_VISIBILITY)
#define LIBART_NO_EXPORT __attribute__ ((visibility("hidden")))
#define LIBART_EXPORT __attribute__ ((visibility("default")))
#elif defined(_WIN32)

@ -48,6 +48,9 @@ art_render_new (int x0, int y0, int x1, int y1,
ArtRenderPriv *priv;
ArtRender *result;
priv = art_new (ArtRenderPriv, 1);
result = &priv->super;
if (n_chan > ART_MAX_CHAN)
{
art_warn ("art_render_new: n_chan = %d, exceeds %d max\n",
@ -65,10 +68,6 @@ art_render_new (int x0, int y0, int x1, int y1,
art_warn ("art_render_new: x0 >= x1 (x0 = %d, x1 = %d)\n", x0, x1);
return NULL;
}
priv = art_new (ArtRenderPriv, 1);
result = &priv->super;
result->x0 = x0;
result->y0 = y0;
result->x1 = x1;

@ -0,0 +1 @@
Subproject commit ca47fa83300e843f1e469e3f455e58aa299e1e9d

@ -1,7 +1,7 @@
#define VERSION "@VERSION@"
// Defined if you have fvisibility and fvisibility-inlines-hidden support.
#cmakedefine __TDE_HAVE_GCC_VISIBILITY 1
#cmakedefine __KDE_HAVE_GCC_VISIBILITY 1
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */

@ -0,0 +1,109 @@
/* config.h.in. Generated from configure.in by autoheader. */
/* Define if building universal (internal helper macro) */
#undef AC_APPLE_UNIVERSAL_BUILD
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
systems. This function is required for `alloca.c' support on those systems.
*/
#undef CRAY_STACKSEG_END
/* Define to 1 if using `alloca.c'. */
#undef C_ALLOCA
/* Define to 1 if you have `alloca', as a function or macro. */
#undef HAVE_ALLOCA
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
*/
#undef HAVE_ALLOCA_H
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* The size of `char', as computed by sizeof. */
#undef SIZEOF_CHAR
/* The size of `int', as computed by sizeof. */
#undef SIZEOF_INT
/* The size of `long', as computed by sizeof. */
#undef SIZEOF_LONG
/* The size of `short', as computed by sizeof. */
#undef SIZEOF_SHORT
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at runtime.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
#undef STACK_DIRECTION
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Version number of package */
#undef VERSION
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
# if defined __BIG_ENDIAN__
# define WORDS_BIGENDIAN 1
# endif
#else
# ifndef WORDS_BIGENDIAN
# undef WORDS_BIGENDIAN
# endif
#endif

@ -0,0 +1,137 @@
m4_define([libart_major_version], [2])
m4_define([libart_minor_version], [3])
m4_define([libart_micro_version], [21])
m4_define([libart_version],
[libart_major_version.libart_minor_version.libart_micro_version])
AC_INIT([libart-lgpl],[libart_version],[http://bugzilla.gnome.org/enter_bug.cgi?product=libart],[libart_lgpl])
AC_CONFIG_HEADERS([config.h])
LIBART_MAJOR_VERSION=libart_major_version
LIBART_MINOR_VERSION=libart_minor_version
LIBART_MICRO_VERSION=libart_micro_version
LIBART_VERSION=libart_version
LIBART_VERSION_INFO=`expr $LIBART_MAJOR_VERSION + $LIBART_MINOR_VERSION`:$LIBART_MICRO_VERSION:$LIBART_MINOR_VERSION
AC_SUBST(LIBART_MAJOR_VERSION)
AC_SUBST(LIBART_MINOR_VERSION)
AC_SUBST(LIBART_MICRO_VERSION)
AC_SUBST(LIBART_VERSION)
AC_SUBST(LIBART_VERSION_INFO)
AM_INIT_AUTOMAKE([1.9 foreign no-dist-gzip dist-bzip2])
AC_ARG_ENABLE(ansi, [ --enable-ansi turn on strict ansi [default=no]],
, enable_ansi=no)
AC_PROG_CC
AC_PROG_CPP
AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
AM_MAINTAINER_MODE
AC_MSG_CHECKING([for some Win32 platform])
case "$host" in
*-*-mingw*|*-*-cygwin*)
platform_win32=yes
;;
*)
platform_win32=no
;;
esac
AC_MSG_RESULT([$platform_win32])
AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
AC_MSG_CHECKING([for native Win32])
case "$host" in
*-*-mingw*)
os_win32=yes
;;
*)
os_win32=no
;;
esac
AC_MSG_RESULT([$os_win32])
AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
if test "$os_win32" = "yes"; then
AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
fi
AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes)
changequote(,)dnl
if test "x$GCC" = "xyes"; then
case " $CFLAGS " in
*[\ \ ]-Wall[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wall" ;;
esac
case " $CFLAGS " in
*[\ \ ]-Wmissing-prototypes[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wmissing-prototypes" ;;
esac
if test "x$enable_ansi" = "xyes"; then
case " $CFLAGS " in
*[\ \ ]-ansi[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -ansi" ;;
esac
case " $CFLAGS " in
*[\ \ ]-pedantic[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -pedantic" ;;
esac
fi
fi
changequote([,])dnl
AC_FUNC_ALLOCA
AC_C_BIGENDIAN
AC_CHECK_SIZEOF(char)
AC_SUBST(ART_SIZEOF_CHAR, $ac_cv_sizeof_char)
AC_CHECK_SIZEOF(short)
AC_SUBST(ART_SIZEOF_SHORT, $ac_cv_sizeof_short)
AC_CHECK_SIZEOF(int)
AC_SUBST(ART_SIZEOF_INT, $ac_cv_sizeof_int)
AC_CHECK_SIZEOF(long)
AC_SUBST(ART_SIZEOF_LONG, $ac_cv_sizeof_long)
if test $ART_SIZEOF_CHAR -eq 1; then
AC_SUBST( ART_U8_TYPE, "unsigned char" )
else
echo 1>&2 "sizeof(char) != 1"
exit 1
fi
if test $ART_SIZEOF_SHORT -eq 2; then
AC_SUBST( ART_U16_TYPE, "unsigned short" )
else
echo 1>&2 "sizeof(short) != 2"
exit 2
fi
if test $ART_SIZEOF_INT -eq 4; then
AC_SUBST( ART_U32_TYPE, "unsigned int" )
else
if test $ART_SIZEOF_LONG -eq 4; then
AC_SUBST( ART_U32_TYPE, "unsigned long" )
else
echo 1>&2 "sizeof(int) != 4 and sizeof(long) != 4"
exit 3
fi
fi
AC_CONFIG_FILES([
art_config.h
libart-features.h
Makefile
libart-2.0.pc
libart-2.0-uninstalled.pc
libart-zip])
AC_OUTPUT

@ -1,4 +1,4 @@
install(
INSTALL(
FILES libart2-config.1
DESTINATION ${MAN_INSTALL_DIR}/man1
COMPONENT doc

@ -0,0 +1,49 @@
#!/bin/sh
# A little utility function to generate header info.
#
# The output of this program is generally written to art_config.h,
# which is installed in libart's include dir.
echo "/* Automatically generated by gen_art_config */"
echo
echo "#ifndef _ART_CONFIG_H_"
echo "#define _ART_CONFIG_H_"
echo
echo "#define ART_SIZEOF_CHAR @ART_SIZEOF_CHAR@"
echo "#define ART_SIZEOF_SHORT @ART_SIZEOF_SHORT@"
echo "#define ART_SIZEOF_INT @ART_SIZEOF_INT@"
echo "#define ART_SIZEOF_LONG @ART_SIZEOF_LONG@"
echo
if test @ART_SIZEOF_CHAR@ -eq 1; then
echo "typedef unsigned char art_u8;"
else
echo 1>&2 "sizeof(char) != 1"
exit 1
fi
if test @ART_SIZEOF_SHORT@ -eq 2; then
echo "typedef unsigned short art_u16;"
else
echo 1>&2 "sizeof(short) != 2"
exit 2
fi
if test @ART_SIZEOF_INT@ -eq 4; then
echo "typedef unsigned int art_u32;"
else
if test @ART_SIZEOF_LONG@ -eq 4; then
echo "typedef unsigned long art_u32;"
else
echo 1>&2 "sizeof(int) != 4 and sizeof(long) != 4"
exit 3
fi
fi
echo
echo "#endif /* _ART_CONFIG_H_ */"
exit 0
}

@ -0,0 +1,10 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: libart
Description: LGPL version of the libart library
Version: @LIBART_VERSION@
Libs: ${pc_top_builddir}/${pcfiledir}/libart_lgpl_2.la
Cflags: -I${pc_top_builddir}/${pcfiledir}

@ -0,0 +1,24 @@
#!/bin/sh
# Build zipfiles for libart_lgpl on Win32, runtime and developer.
ZIP=/tmp/libart_lgpl-@LIBART_VERSION@.zip
DEVZIP=/tmp/libart_lgpl-dev-@LIBART_VERSION@.zip
cd @prefix@
rm $ZIP
DLLDIR=lib
[ -f bin/libart_lgpl_2-@LIBART_MAJOR_VERSION@.dll ] && DLLDIR=bin
zip -r $ZIP -@ <<EOF
$DLLDIR/libart_lgpl_2-@LIBART_MAJOR_VERSION@.dll
EOF
rm $DEVZIP
zip -r $DEVZIP -@ <<EOF
include/libart-2.0
lib/libart_lgpl_2.dll.a
lib/art_lgpl_2.lib
lib/pkgconfig/libart-2.0.pc
EOF

@ -1,172 +0,0 @@
include_directories(
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
)
##### write configure files
configure_file( art_config.h.cmake art_config.h @ONLY )
configure_file( libart-features.h.cmake libart-features.h @ONLY )
##### src
set( _SRCS art_affine.c art_alphagamma.c
art_bpath.c art_gray_svp.c
art_misc.c art_pixbuf.c
art_rect.c art_rect_svp.c
art_rect_uta.c art_render.c
art_render_gradient.c art_render_mask.c
art_render_svp.c art_rgb.c
art_rgb_affine.c art_rgb_affine_private.c
art_rgb_bitmap_affine.c art_rgb_pixbuf_affine.c
art_rgb_rgba_affine.c art_rgb_a_affine.c
art_rgba.c art_rgb_svp.c
art_svp.c art_svp_intersect.c
art_svp_ops.c art_svp_point.c
art_svp_render_aa.c art_svp_vpath.c
art_svp_vpath_stroke.c art_svp_wind.c
art_uta.c art_uta_ops.c
art_uta_rect.c art_uta_vpath.c
art_uta_svp.c art_vpath.c
art_vpath_bpath.c art_vpath_dash.c
art_vpath_svp.c libart-features.c
)
## shared
tde_add_library( art_lgpl_2 SHARED
SOURCES
${_SRCS}
LINK
${MATH_LIBC}
VERSION ${LIBART_VERSION}
DESTINATION ${LIB_INSTALL_DIR}
)
## static
tde_add_library( art_lgpl_2 STATIC_PIC
SOURCES
${_SRCS}
LINK
${MATH_LIBC}
VERSION ${LIBART_VERSION}
DESTINATION ${LIB_INSTALL_DIR}
)
## tests
tde_add_check_executable( testart
SOURCES
testart.c
LINK
art_lgpl_2-shared
${MATH_LIBC}
)
add_test(
NAME testart-testpat
COMMAND testart testpat
)
#-- the testart-gradient often ends at sigsegv
#add_test(
# NAME testart-gradient
# COMMAND testart gradient
#)
add_test(
NAME testart-dash
COMMAND testart dash
)
add_test(
NAME testart-dist
COMMAND testart dist
)
add_test(
NAME testart-intersect
COMMAND testart intersect
)
tde_add_check_executable( testuta
SOURCES
testuta.c
LINK
art_lgpl_2-shared
${MATH_LIBC}
TEST
)
##### Headers
set( _headers art_affine.h art_alphagamma.h
art_bpath.h
art_filterlevel.h art_gray_svp.h
art_misc.h art_pathcode.h art_pixbuf.h
art_point.h art_rect.h art_rect_svp.h
art_rect_uta.h art_render.h
art_render_gradient.h art_render_mask.h
art_render_svp.h art_rgb.h
art_rgb_affine.h art_rgb_bitmap_affine.h
art_rgb_pixbuf_affine.h art_rgb_rgba_affine.h
art_rgb_a_affine.h art_rgb_svp.h
art_rgba.h art_svp.h
art_svp_intersect.h art_svp_ops.h
art_svp_point.h art_svp_render_aa.h
art_svp_vpath.h art_svp_vpath_stroke.h
art_svp_wind.h art_uta.h
art_uta_ops.h art_uta_rect.h
art_uta_vpath.h art_uta_svp.h
art_vpath.h art_vpath_bpath.h
art_vpath_dash.h art_vpath_svp.h
libart.h
${CMAKE_CURRENT_BINARY_DIR}/art_config.h
${CMAKE_CURRENT_BINARY_DIR}/libart-features.h
)
install(
FILES ${_headers}
DESTINATION ${INCLUDE_INSTALL_DIR}/libart-2.0/libart_lgpl
)
#### pkg-config
set( prefix ${CMAKE_INSTALL_PREFIX} )
string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" exec_prefix ${EXEC_INSTALL_PREFIX} )
string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" includedir ${INCLUDE_INSTALL_DIR} )
string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" libdir ${LIB_INSTALL_DIR} )
configure_file( libart-2.0.pc.cmake libart-2.0.pc @ONLY )
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/libart-2.0.pc
DESTINATION ${PKGCONFIG_INSTALL_DIR}
)
##### config helper
install(
PROGRAMS libart2-config
DESTINATION ${BIN_INSTALL_DIR}
)
Loading…
Cancel
Save