graphics: Add 3rd party graphics support back to the master branch.

The support is added at the top level and so not lost when we
move to a new version of RTEMS.

The change also moves all 3rd party packages to use a common
rtems-package.bset build set file.

All packages except Microwindows itself build cleanly.
This commit is contained in:
Chris Johns 2016-04-15 11:56:36 +10:00
parent 70fc466b48
commit f5e724fc07
23 changed files with 266 additions and 20 deletions

View File

@ -0,0 +1,15 @@
#
# Build set for Sqlite
#
%define release 1
#
# The RTEMS Package defines
#
%include rtems-package.bset
#
# Build Sqlite
#
databases/sqlite-3.8.8.1-1

View File

@ -0,0 +1,15 @@
#
# Build set for freetype
#
%define release 1
#
# The RTEMS Package defines
#
%include rtems-package.bset
#
# Build freetype.
#
graphics/freetype-2.4.10-1.cfg

View File

@ -0,0 +1,9 @@
#
# All RTEMS Graphics Build Sets
#
graphics/libjpeg
graphics/libpng
graphics/libtiff
graphics/t1lib
graphics/nxlib

View File

@ -0,0 +1,15 @@
#
# Build set for libjpeg
#
%define release 1
#
# The RTEMS Package defines
#
%include rtems-package.bset
#
# Build libjpeg.
#
graphics/libjpeg-9a-1.cfg

View File

@ -0,0 +1,22 @@
#
# libpng 1.6.21
#
%if %{release} == %{nil}
%define release 1
%endif
%include %{_configdir}/rtems-bsp.cfg
#
# libpng Version
#
%define libpng_version 1.6.21
%define libpng_src_dir_revision 16
#%hash md5 libpng-%{libpng_version}.tar.gz 6652e428d1d3fc3c6cb1362159b1cf3b
#
# libpng Build configuration
#
%include %{_configdir}/libpng-1.cfg

View File

@ -0,0 +1,15 @@
#
# Build set for libpng
#
%define release 1
#
# The RTEMS Package defines
#
%include rtems-package.bset
#
# Build libpng.
#
graphics/libpng-1.6.21-1.cfg

View File

@ -0,0 +1,15 @@
#
# Build set for libtiff
#
%define release 1
#
# The RTEMS Package defines
#
%include rtems-package.bset
#
# Build libtiff.
#
graphics/libtiff-4.0.2-1.cfg

View File

@ -13,6 +13,14 @@
#
%define microwindows_version 0.93-dev
%define rtems_git_tools_4_11 %{rtems_http_git}/rtems-tools/plain/tools/4.11
%source set microwindows git://github.com/alex-sever-h/microwin.git
%patch add microwindows %{rtems_git_tools_4_11}/microwindows/microwindows-0.93-dev.diff
%hash md5 microwindows-0.93-dev.diff 5b06e77d9ee42c8ff0032bba07d01c1a
%patch add microwindows %{rtems_git_tools_4_11}/microwindows/microwindows-0.93-dev-without-keyboard.diff
%hash md5 microwindows-0.93-dev-without-keyboard.diff a675f55750754e1cd82a17496f0e8fab
#
# microwindows Build configuration
#

View File

@ -0,0 +1,16 @@
#
# Build set for Nano-X Window System
#
%define release 1
#
# The RTEMS Package defines
#
%include rtems-package.bset
#
# Build microwindows.
#
graphics/freetype2
graphics/microwindows-0.93-dev-1.cfg

View File

@ -0,0 +1,16 @@
#
# Build set for nxlib
#
%define release 1
#
# The RTEMS Package defines
#
%include rtems-package.bset
#
# Build nxlib.
#
graphics/microwindows
graphics/nxlib-0.47-dev-1.cfg

View File

@ -15,6 +15,12 @@
%hash md5 t1lib-%{t1lib_version}.tar.gz a5629b56b93134377718009df1435f3c
#
# Patch for RTEMS.
#
%patch add t1lib https://raw.githubusercontent.com/yangqiao/rtems-tools/graphics/tools/4.11/t1lib/t1lib-5.1.2.diff
%hash md5 t1lib-5.1.2.diff 98eeed85780227adf8525deab3679877
#
# t1lib Build configuration
#

View File

@ -0,0 +1,15 @@
#
# Build set for adobe type 1 library
#
%define release 1
#
# The RTEMS Package defines
#
%include rtems-package.bset
#
# Build t1lib.
#
graphics/t1lib-5.1.2-1.cfg

View File

@ -0,0 +1,20 @@
#
# Build set for NetSNMP
#
%define release 1
#
# RTEMS Version
#
%define rtems_version 4.11
#
# The RTEMS URL paths.
#
%include rtems-urls.bset
#
# Build NetSNMP.
#
net-mgmt/net-snmp-5.7.2.1-1

View File

@ -0,0 +1,15 @@
#
# Build set for LWIP
#
%define release 1
#
# The RTEMS Package defines
#
%include rtems-package.bset
#
# Build LWIP.
#
net/lwip-1-1.cfg

15
rtems/config/net/ntp.bset Normal file
View File

@ -0,0 +1,15 @@
#
# Build set for NTP
#
%define release 1
#
# The RTEMS Package defines
#
%include rtems-package.bset
#
# Build NTP.
#
net/ntp-4.2.6p5-1

View File

@ -0,0 +1,15 @@
#
# Build set for Google Protocol Buffers
#
%define release 1
#
# The RTEMS Package defines
#
%include rtems-package.bset
#
# Build Protocol Buffers.
#
net/protobuf-2.6.1-1

View File

@ -0,0 +1,13 @@
#
# Build Set Base defines for RTEMS Packages
#
#
# Get the version of RTEMS
#
%include rtems-version.bset
#
# Pick up the RTEMS URLs.
#
%include rtems-urls.bset

View File

@ -41,7 +41,10 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
%{host_build_flags}
../${source_dir_freetype}/configure \
%ifos freebsd
GNUMAKE=%{__make} \
%endif
../${source_dir_freetype}/configure \
--host=%{_host} \
--prefix=%{_prefix} \
--bindir=%{_bindir} \

View File

@ -12,7 +12,7 @@ Name: libpng-v%{libpng_version}-%{_host}-%{release}
Summary: libpng is the official PNG reference library
Version: %{libpng_version}
Release: %{release}
URL: http://www.libpng.org/
URL: http://www.libpng.org/
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#

View File

@ -42,7 +42,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
%{host_build_flags}
CFLAGS= CXXFLAGS= ../${source_dir_tiff}/configure \
../${source_dir_tiff}/configure \
--host=%{_host} \
--prefix=%{_prefix} \
--bindir=%{_bindir} \

View File

@ -18,11 +18,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# microwindows Source
#
%source set microwindows git://github.com/alex-sever-h/microwin.git
%patch add microwindows %{rtems_git_tools}/microwindows/microwindows-0.93-dev.diff
%hash md5 microwindows-0.93-dev.diff 5b06e77d9ee42c8ff0032bba07d01c1a
%patch add microwindows %{rtems_git_tools}/microwindows/microwindows-0.93-dev-without-keyboard.diff
%hash md5 microwindows-0.93-dev-without-keyboard.diff a675f55750754e1cd82a17496f0e8fab
%source set microwindows ftp://microwindows.censoft.com/pub/microwindows/microwindows-src-%{microwindows_version}.tar.gz
#
# Prepare the source code.
@ -38,7 +34,6 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Build the source code.
# The configure should be run in the source dir
#
%build
build_top=$(pwd)
@ -53,7 +48,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
export RTEMS_MAKEFILE_PATH=%{rtems_bsp_prefix}
make -f Makefile.rtems CONFIG=`pwd`/Configs/config.rtems -k all
%{__make} -f Makefile.rtems CONFIG=`pwd`/Configs/config.rtems -k all
cd ${build_top}

View File

@ -12,15 +12,13 @@ Name: t1lib-v%{t1lib_version}-%{_host}-%{release}
Summary: t1lib is the official PNG reference library
Version: %{t1lib_version}
Release: %{release}
URL: http://www.t1lib.org/
URL: http://www.t1lib.org/
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# t1lib Source
#
%source set t1lib ftp://ftp.netbsd.org/pub/pkgsrc/distfiles/t1lib-%{t1lib_version}.tar.gz
%patch add t1lib https://raw.githubusercontent.com/yangqiao/rtems-tools/graphics/tools/4.11/t1lib/t1lib-5.1.2.diff
%hash md5 t1lib-5.1.2.diff 98eeed85780227adf8525deab3679877
#
# Prepare the source code.

View File

@ -198,19 +198,20 @@ export SB_ORIG_PATH=${PATH}
%{?_prefix:SB_PREFIX_CLEAN=$(echo "%{_prefix}" | %{__sed} -e 's/^\///')}
SB_SOURCE_DIR="%{_sourcedir}"
SB_BUILD_DIR="%{_builddir}"
# host == build, use build; host != build , host uses host and build uses build
# host == build, use build; host != build, host uses host and build uses build
SB_HOST_CPPFLAGS="%{host_includes}"
SB_HOST_CFLAGS="%{host_cflags} %{host_includes}"
SB_HOST_CXXFLAGS="%{host_cxxflags} %{host_includes}"
SB_HOST_LDFLAGS="%{?host_ldflags:%{host_ldflags}}%{?_tmproot:-L%{_tmproot}/${SB_PREFIX_CLEAN}/lib}"
SB_HOST_LDFLAGS="%{?host_ldflags:%{host_ldflags}} %{?_tmproot:-L%{_tmproot}/${SB_PREFIX_CLEAN}/lib}"
SB_BUILD_CFLAGS="%{build_cflags} %{?_tmproot:-I%{_tmproot}/${SB_PREFIX_CLEAN}/include}"
SB_BUILD_CXXFLAGS="%{build_cxxflags} %{?_tmproot:-I%{_tmproot}/${SB_PREFIX_CLEAN}/include}"
SB_BUILD_LDFLAGS="%{?build_ldflags:%{build_ldflags}}%{?_tmproot:-L%{_tmproot}/${SB_PREFIX_CLEAN}/lib}"
SB_BUILD_LDFLAGS="%{?build_ldflags:%{build_ldflags}} %{?_tmproot:-L%{_tmproot}/${SB_PREFIX_CLEAN}/lib}"
SB_CFLAGS="${SB_BUILD_CFLAGS} %{build_includes}"
SB_CXXFLAGS="${SB_BUILD_CXXFLAGS} %{build_includes}"
SB_ARCH="%{_arch}"
SB_OS="%{_os}"
export SB_SOURCE_DIR SB_BUILD_DIR SB_ARCH SB_OS
export SB_HOST_CFLAGS SB_HOST_CXXFLAGS SB_HOST_LDFLAGS
export SB_HOST_CPPFLAGS SB_HOST_CFLAGS SB_HOST_CXXFLAGS SB_HOST_LDFLAGS
export SB_BUILD_CFLAGS SB_BUILD_CXXFLAGS SB_BUILD_LDFLAGS
export SB_CFLAGS SB_CXXFLAGS
# Documentation
@ -298,7 +299,9 @@ FFLAGS="${FFLAGS:-${SB_CFLAGS}}" ; export FFLAGS ;
# Build script support.
build_directory: none, none, '''
if test "%{_build}" != "%{_host}" ; then
if test -z "%{_target}" ; then
# Cross-build (Xc) if no target or the host and target match.
# Canadian-cross (Cxc) if build, host and target are all different.
if test -z "%{_target}" -o "%{_host}" == "%{_target}" ; then
build_dir="build-xc"
else
build_dir="build-cxc"
@ -316,10 +319,12 @@ if test "%{_build}" != "%{_host}" ; then
# Cross build
CC=$(echo "%{_host}-%{_host_cc}" | sed -e 's,-std=gnu99 ,,')
CXX=$(echo "%{_host}-%{_host_cxx}" | sed -e 's,-std=gnu99 ,,')
CPPFLAGS="${SB_HOST_CPPFLAGS}"
CFLAGS="${SB_HOST_CFLAGS}"
CXXFLAGS="${SB_HOST_CXXFLAGS}"
LDFLAGS="${SB_HOST_LDFLAGS}"
# Host
CPPFLAGS_FOR_HOST="${SB_HOST_CPPFLAGS}"
CFLAGS_FOR_HOST="${SB_HOST_CFLAGS}"
CXXFLAGS_FOR_HOST="${SB_HOST_CXXFLAGS}"
LDFLAGS_FOR_HOST="${SB_HOST_LDFLAGS}"
@ -340,8 +345,8 @@ else
CC_FOR_BUILD=${CC}
CXX_FOR_BUILD=${CXX}
fi
export CC CXX CFLAGS CXXFLAGS LDFLAGS
export CC_FOR_HOST CXX_FOR_HOST CFLAGS_FOR_HOST CXXFLAGS_FOR_HOST LDFLAGS_FOR_HOST
export CC CXX CPPFLAGS CFLAGS CXXFLAGS LDFLAGS
export CC_FOR_HOST CXX_FOR_HOST CPPFLAGS_FOR_HOST CFLAGS_FOR_HOST CXXFLAGS_FOR_HOST LDFLAGS_FOR_HOST
export CC_FOR_BUILD CXX_FOR_BUILD CFLAGS_FOR_BUILD CXXFLAGS_FOR_BUILD LDFLAGS_FOR_BUILD'''
# Build/build flags.