您的位置:首页 > 产品设计 > UI/UE

MXE (M cross environment) Requirements

2016-05-18 16:56 666 查看


Requirements

MXE requires a recent Unix system where all components as stated in the table below are installed. It also needs roughly 2 GiB of RAM to link gcc and at least 700 MB of disk space per target (counted with only gcc built).

Detailed instructions are available for:

Debian
Fedora
FreeBSD
Frugalware
Gentoo
Mac OS X
openSUSE

Autoconf≥ 2.68
Automake≥ 1.11.3
Bash
Bison
Bzip2
Flex≥ 2.5.31
GCC (gcc, g++)
gdk-pixbuf
Git≥ 1.7
GNU Coreutils
GNU Gettext
GNU gperf
GNU Make≥ 3.81
GNU Sed
GNU Tar
Intltool≥ 0.40
LibC for 32-bit
libffi≥ 3.0.0
Libtool≥ 2.2
OpenSSL-dev≥ 1.01
p7zip (7-Zip)
Patch
Perl
Perl XML::Parser
Pkg-config≥ 0.16
Python
Ruby
SCons≥ 0.98
UnZip
Wget
XZ Utils
zlib≥ 1.20


Debian and derivatives

apt-get install \
autoconf automake autopoint bash bison bzip2 flex gettext\
git g++ gperf intltool libffi-dev libgdk-pixbuf2.0-dev \
libtool libltdl-dev libssl-dev libxml-parser-perl make \
openssl p7zip-full patch perl pkg-config python ruby scons \
sed unzip wget xz-utils

On 64-bit Debian, install also:

apt-get install g++-multilib libc6-dev-i386

On Debian Jessie (8) or Ubuntu Utopic (14.10) or later, install also:

apt-get install libtool-bin

Only the latest Debian stable series is supported.

You can install a precompiled MXE via Debian packages. See pkg.mxe.cc.


Fedora

yum install \
autoconf automake bash bison bzip2 flex gcc-c++ \
gdk-pixbuf2-devel gettext git gperf intltool make \
sed libffi-devel libtool openssl-devel p7zip patch \
perl pkgconfig python ruby scons unzip wget xz

On 64-bit Fedora, there are issues without a 32-bit compiler.


FreeBSD

pkg install \
automake autoconf bash bison coreutils flex \
gcc gdk-pixbuf2 gettext git glib gmake gperf gsed intltool libffi \
libtool openssl p5-XML-Parser p7zip patch perl5 \
pkgconf python ruby scons unzip wget

Use gmake instead of make.

Install file(1) from ports, because file(1) from baseworks very-very-very slow with long text files.

Do not build as root. See #902.

Ensure that /usr/local/bin precedes /usr/bin in your $PATH:

For C style shells, edit .cshrc

setenv PATH /usr/local/bin:$PATH

For Bourne shells, edit .profile

export PATH=/usr/local/bin:$PATH

On 64-bit FreeBSD, there are issues without a 32-bit compiler.

N.B. FreeBSD is no longer fully supported

to build the remainder of MXE, run:

gmake EXCLUDE_PKGS='gtksourceviewmm2 ocaml% openexr pcl qtbase'

to see a list of all dependent downstream packages that will be excluded, run:

gmake show-downstream-deps-'gtksourceviewmm2 ocaml% openexr \
pcl qtbase'


Frugalware

pacman-g2 -S \
autoconf automake bash bzip2 bison flex gcc gdk-pixbuf2\
gettext git gperf intltool make sed libffi libtool \
openssl patch perl perl-xml-parser pkgconfig python \
ruby scons unzip wget xz xz-lzma

On 64-bit Frugalware, there are issues without a 32-bit compiler.


Gentoo

emerge \
sys-devel/autoconf sys-devel/automake app-shells/bash \
sys-devel/bison app-arch/bzip2 \
sys-devel/flex sys-devel/gcc sys-devel/gettext \
dev-vcs/git dev-util/gperf dev-util/intltool \
sys-devel/make sys-apps/sed dev-libs/libffi \
sys-devel/libtool dev-libs/openssl app-arch/p7zip \
sys-devel/patch dev-lang/perl dev-perl/XML-Parser \
dev-util/pkgconfig dev-lang/python dev-lang/ruby \
dev-util/scons app-arch/unzip net-misc/wget \
app-arch/xz-utils x11-libs/gdk-pixbuf


Mac OS X

Install the latest Xcode

Method 1 - MacPorts
Install MacPorts, then run:

sudo port install \
autoconf automake bison coreutils flex gettext \
gdk-pixbuf2 glib2 gnutar gsed intltool libffi libtool \
openssl p5-xml-parser p7zip pkgconfig scons wget xz

Method 2 - Rudix
Install Rudix, then run:

sudo rudix install \
autoconf automake coreutils gettext glib intltool \
libtool p7zip scons sed tar wget xz

Note: gdk-pixbuf2 is not installed in method 2, so you can not build gtk3. Other packages may be missing on Rudix - please open an issue if you find any.

Method 3 - Homebrew
Install Homebrew, then run:

brew install \
autoconf automake coreutils gdk-pixbuf gettext \
gnu-sed gnu-tar intltool libtool p7zip wget xz

Some formulae are
keg-only
and will need
brew
link
to be found.

Genral Notes
You may be prompted to install a java runtime - this is not required.

Mac OS X versions ≤ 10.9 are no longer tested.

Certain packages have open issues on OS X

For Xcode <7.3, run:

make EXCLUDE_PKGS='nsis'

For Xcode ≥7.3, run:

make EXCLUDE_PKGS='gsoap'


openSUSE

zypper install -R \
autoconf automake bash bison bzip2 flex gcc-c++ \
gdk-pixbuf-devel gettext-tools git gperf intltool \
libffi-devel libtool make openssl libopenssl-devel \
p7zip patch perl perl-XML-Parser pkg-config python \
ruby scons sed unzip wget xz

On 64-bit openSUSE, install also:

zypper install -R \
gcc-32bit glibc-devel-32bit libgcc46-32bit \
libgomp46-32bit libstdc++46-devel-32bit


Issues without a 32-bit compiler

Certain packages contain native tools that are currently 32-bit only. In order to build these on a 64-bit system, multi-lib support must be enabled in the compiler toolchain. However, not all operating systems support this.

To build the remainder of MXE, specify the affected packages to exclude:

make EXCLUDE_PKGS='ocaml%'



Usage

All build commands also download the packages if necessary.

In a BSD userland, substitute "make" with "gmake" as all commands are based on GNU Make.

makebuild all packages, non-parallel
make gccbuild a minimal useful set of packages, i.e. the cross compilers and the most basic packages, non-parallel
make foo barbuild packages "foo", "bar" and their dependencies, non-parallelthe package list can also be set in
settings.mk

LOCAL_PKG_LIST := foo bar
.DEFAULT local-pkg-list:
local-pkg-list: $(LOCAL_PKG_LIST)

so a call to
make
will only build those packages (and their dependencies, of course)
make foo bar --touchmark packages "foo" and "bar" as up-to-date after a trivial change in one of their dependencies (short option "-t")
make foo bar --jobs=4 JOBS=2build packages "foo", "bar" and their dependencies, where up to 4 packages are built in parallel (short option "-j 4"), each with up to 2 compiler processes running in parallelthe JOBS variable can also be defined in
settings.mk
and defaults to the number of CPUs up to a max of 6 to prevent runaway system load with diminishing returns - see the GNU
Make manual for more details on parallel execution
make --jobs=4 --keep-goingbuild all packages with 4 inter-package parallel jobs and continue as much as possible after an error (short option "-j 4 -k")
make EXCLUDE_PKGS='foo bar'build all packages excluding foo, bar, and all downstream packages that depend on them - mostly used when there are known issues
make check-requirementscheck most of the requirements if necessary – executed automatically before building packages
make downloaddownload all packages, non-parallel, such that subsequent builds work without internet access
make download-foo download-bardownload packages "foo", "bar" and their dependencies, non-parallel
make download-foo download-bar -j 4download packages "foo", "bar" and their dependencies, where up to 4 packages are downloaded in parallel
make download-only-foo download-only-bardownload packages "foo", "bar", without their dependencies, non-parallel
make cleanremove all package builds – use with caution!
make clean-junkremove all unused files, including unused package files, temporary folders, and logs
make clean-pkgremove all unused package files, handy after a successful update
make show-deps-fooprint a list of upstream dependencies and downstream dependents
make show-downstream-deps-fooprint a list of downstream dependents suitable for usage in shell scripts
make show-upstream-deps-fooprint a list of upstream dependencies suitable for usage in shell scripts
make build-matrix.htmlgenerate a report of what packages are supported on what targets to build-matrix.html
make updatefor internal use only! – update the version numbers of all packages, download the new versions and note their checksums
make update UPDATE_DRYRUN=truefor internal use only! – show list of update candidates without downloading
make update-package-foofor internal use only! – update the version numbers of package foo, download the new version and note its checksum
make update-checksum-foofor internal use only! – download package foo and update its checksum
make cleanup-stylefor internal use only! – cleanup coding style


List of Packages

See something missing? Feel free to create a new package.

a52dec0.7.4a52dec (aka. liba52)
agg2.5Anti-Grain Geometry
alure1.2alure
apr1.5.2APR
apr-util1.5.4APR-util
armadillo6.400.3Armadillo C++ linear algebra library
aspell0.60.6.1Aspell
assimp3.2Assimp Open Asset Import Library
atk2.16.0ATK
atkmm2.22.7ATKmm
aubio0.4.2aubio
db6.1.26Oracle Berkeley DB
bfd2.25.1Binary File Descriptor library
binutils2.25.1GNU Binutils
blas3.5.0blas
boost1.60.0Boost C++ Library
box2d2.3.1Box2D
bullet2.82-r2704Bullet physics, version 2
bzip21.0.6bzip2
cairo1.14.6cairo
cairomm1.11.2cairomm
cblas1cblas
ccfits2.4CCfits
cegui0.7.9Crazy Eddie’s GUI System (CEGUI)
cfitsio3370cfitsio
cgal4.6.3cgal
check0.10.0check
chipmunk6.2.2Chipmunk Physics
chromaprint1.1Chromaprint
cloog0.18.1CLooG Code Generator
cimg1.6.3CImg Library
cmake3.5.2cmake
cminpack1.3.4cminpack
coda2.15.1CODA
coin3.1.3Coin3D
cpp-netlib0.11.2Boost C++ Networking Library
cppunit1.13.2CppUnit
cryptopp5.6.3Crypto++ Library
crystalhd1Broadcom Crystal HD Headers
cunit2.1-3cunit
curl7.48.0cURL
dbus1.11.2dbus
dcmtk3.6.0DCMTK
devil1.7.8DevIL
dlfcn-win321.0.0POSIX dlfcn wrapper for Windows
eigen3.2.5eigen
exiv20.25Exiv2
expat2.1.1Expat XML Parser
faad22.7faad2
fdk-aac0.1.4FDK-AAC
ffmpeg3.0ffmpeg
fftw3.3.4fftw
file5.24file
flac1.3.1FLAC
flann1.8.4FLANN
fltk1.3.3FLTK
fontconfig2.11.1fontconfig
freeglut2.8.1freeglut
freeimage3.15.4FreeImage
freetds0.95.95FreeTDS
freetype2.6.3freetype
freetype-bootstrap2.6.3freetype (without harfbuzz)
fribidi0.19.6FriBidi
ftgl2.1.3~rc5ftgl
gc7.2egc
gcc4.9.3GCC
gd2.1.0GD (without support for xpm)
gdal2.0.2GDAL
gdb7.11gdb
gdk-pixbuf2.32.3GDK-pixbuf
gendef4.0.6gendef
geoip-database20150317-1GeoIP Legacy Database
geos3.4.2GEOS
gettext0.19.7gettext
giflib5.0.5giflib
glew1.12.0GLEW
glfw22.7.9GLFW 2.x
glfw33.1.2GLFW 3.x
glib2.44.1GLib
glibmm2.42.0GLibmm
gmp6.1.0GMP
gnutls3.4.11GnuTLS
googletest1.7.0Google Test
graphicsmagick1.3.21GraphicsMagick
gsl1.16GSL
gsoap2.8.22gSOAP
gst-plugins-bad1.6.2gst-plugins-bad
gst-plugins-base1.6.2gst-plugins-base
gst-plugins-good1.6.2gst-plugins-good
gst-plugins-ugly1.6.2gst-plugins-ugly
gstreamer1.6.2gstreamer
gta1.0.7gta
gtk22.24.29GTK+
gtk33.14.4GTK+
gtkglarea2.0.1GtkGLArea
gtkglext1.2.0GtkGLExt
gtkglextmm1.2.0GtkGLExtmm
gtkimageview1.6.4GtkImageView
gtkmm22.24.4GTKMM
gtkmm33.14.0GTKMM
gtksourceview2.10.5GTKSourceView
gtksourceviewmm22.10.3GtkSourceViewmm
guile1.8.8GNU Guile
harfbuzz1.2.7HarfBuzz
hdf44.2.10HDF4
hdf51.8.12HDF5
hunspell1.3.3Hunspell
icu4c56.1ICU4C
id3lib3.8.3id3lib
ilmbase2.2.0IlmBase
imagemagick6.9.0-0ImageMagick
isl0.12.2Integer Set Library
itk4.8.2Insight Segmentation and Registration Toolkit (ITK)
jack1.9.10JACK Audio Connection Kit
jansson2.7Jansson
jasper1.900.1JasPer
jpeg9bjpeg
json-c0.12json-c
json-glib1.0.4JSON-Glib
json_spirit4.08json_spirit
jsoncpp1.6.5jsoncpp
lame3.99.5lame
lapack3.6.0lapack
lcms2.7lcms
lcms11.19lcms1
lensfun0.3.0lensfun
levmar2.6levmar
libaacs0.8.1libaacs
libarchive3.1.2Libarchive
libass0.13.1libass
libbluray0.9.2libbluray
libbs2b3.1.0Bauer Stereophonic-to-Binaural library
libcaca0.99.beta19libcaca
libcdio0.93Libcdio
libcdio-paranoia10.2+0.93+1Libcdio-paranoia
libcomm14cux2.1.1libcomm14cux
libcroco0.6.2Libcroco
libdnet1.11libdnet
libdvbpsi1.2.0libdvbpsi
libdvdcss1.3.0libdvdcss
libdvdnav5.0.1libdvdnav
libdvdread5.0.0libdvdread
libechonest2.3.1libechonest
libepoxy1.3.1libepoxy
libevent2.0.21libevent
libf2c1libf2c
libffi3.2.1libffi
libftdi0.20LibFTDI
libftdi11.2LibFTDI1
libgcrypt1.7.0libgcrypt
libgda4.2.13libgda
libgdamm4.1.3libgdamm
libgee0.5.0libgee
libgeotiff1.4.0GeoTiff
libgit20.23.2libgit2
libglade2.6.4glade
libgnurx2.6.1libgnurx
libgpg_error1.21libgpg-error
libgsasl1.8.0Libgsasl
libgsf1.14.30libgsf
libharu2.2.1libharu
libiberty2.25.1libiberty
libical2.0.0libical
libiconv1.14libiconv
libid3tag0.15.1blibid3tag
libidn1.32Libidn
libieee12840.2.11libieee1284
libircclient1.8libircclient
libjpeg-turbo1.4.1libjpeg-turbo
liblaxjson1.0.5liblaxjson
liblo0.28rcliblo
liblqr-10.4.2liblqr-1
liblsmash2.9.1L-SMASH
libltdl2.4.4GNU Libtool Library (libltdl)
libmad0.15.1blibmad
libmicrohttpd0.9.38GNU Libmicrohttpd
libmikmod3.3.7libMikMod
libmng2.0.3libmng
libmodplug0.8.8.4libmodplug
libmpcdec1.2.6libmpcdec
libmysqlclient6.1.6libmysqlclient
libntlm1.4Libntlm
liboauth1.0.3liboauth
libodbc++0.2.5libodbc++
liboil0.3.17liboil
libpano132.9.18libpano13
libpaper1.1.24+nmu4libpaper
libplist1.12libplist
libpng1.6.21libpng
librsvg2.40.5librsvg
librosco0.1.11librosco
librtmpa107ceflibrtmp
libsamplerate0.1.8libsamplerate
libshout2.4.1libshout
libsigc++2.4.0libsigc++
libsndfile1.0.25libsndfile
libsodium1.0.6libsodium
libsoup2.54.0.1libsoup
libssh21.7.0libssh2
libsvm3.20libsvm
libtool2.4.4GNU Libtool
libtorrent-rasterbar1.0.7libtorrent-rasterbar
libunistring0.9.4libunistring
libusb1.2.6.0LibUsb
libusb11.0.19LibUsb-1.0
libuv1.9.0libuv
libvpx1.5.0vpx
libwebp0.4.4libwebp
libwebsockets1.4-chrome43…libwebsockets
libxml++2.37.2libxml2
libxml22.9.2libxml2
libxslt1.1.28libxslt
libzip0.11.2libzip
llvm3.4llvm
log4cxx0.10.0log4cxx
lua5.3.2Lua
luabind0.9.1Luabind
luajit2.0.4LuaJIT
lzma920LZMA SDK
lzo2.09lzo
matio1.5.2matio
mdbtools0.7.1mdbtools
miniupnpc1.9miniupnpc
minizip0b46a2bminizip
mingw-w644.0.6MinGW-w64 Runtime
mman-win32b7ec370MMA-Win32
mpc1.0.2GNU MPC
mpfr3.1.4mpfr
mpg1231.22.4mpg123
muparser2.2.5muParser
muparserx4.0.4muParserX
mxml2.9Mini-XML
ncursese14300bNcurses
netcdf4.3.0NetCDF
netpbm10.35.96Netpbm
nettle3.2nettle
nlopt2.4.2NLopt
nsis2.51NSIS
ocaml-cairo1.2.0cairo-ocaml
ocaml-camlimages4.0.1camlimages
ocaml-core4.00.1ocaml
ocaml-findlib1.4findlib
ocaml-flexdll0.31flexdll
ocaml-lablgl1.05lablgl
ocaml-lablgtk22.16.0lablgtk2
ocaml-native4.00.1ocaml
ocaml-xml-light2.2xml-light
oce0.16.1Open CASCADE Community Edition
ogg1.3.2OGG
old0.17old
openal1.16.0openal
openblas0.2.15OpenBLAS
opencore-amr0.1.3opencore-amr
opencsg1.4.0opencsg
opencv2.4.10OpenCV
openexr2.2.0OpenEXR
openjpeg2.1.0OpenJPEG
openmp-validation3.1OpenMP Validation Suite
openscenegraph3.4.0OpenSceneGraph
openssl1.0.2hopenssl
openthreads3.4.0OpenThreads
opus1.1.1opus
opusfile0.6opusfile
ossim1.8.20OSSIM
pango1.37.4Pango
pangomm2.34.0Pangomm
pcl1.7.2PCL (Point Cloud Library)
pcre8.38PCRE
pdcurses3.4PDcurses
pdflib_lite7.0.5p3PDFlib Lite
pfstools2.0.4pfstools
physfs2.0.3physfs
picomodel1142ad8picomodel
pire0.0.5PIRE
pixman0.33.6pixman
pkgconfda179fdpkgconf
plib1.8.5-rc1Plib
plibccd7ed09Plibc
plotmm0.1.2PlotMM
plotutils2.6plotutils
poco1.4.7p1POCO C++ Libraries
polarssl1.3.9Polar SSL Library
poppler0.30.0poppler
popt1.16popt
portablexdr4.9.1PortableXDR
portaudio19_20140130portaudio
portmidi217portmidi
postgresql9.2.4PostgreSQL
primesieve5.5.0Primesieve
proj4.9.1proj
protobuf2.6.1protobuf
pthreadsPOSIX 1003.1…POSIX Threads
qdbm1.8.78QDBM
qhttpengine0.1.0qhttpengine
qjson0.8.1QJson
qscintilla22.8.4QScintilla2
qt4.8.7Qt
qt3dbcdbf04b74cc…Qt
qt55.6.0Qt
qtactiveqt5.6.0Qt
qtbase5.6.0Qt
qtcanvas3d5.6.0Qt
qtconnectivity5.6.0Qt
qtdeclarative5.6.0Qt
qtenginio1.6.0Qt
qtgraphicaleffects5.6.0Qt
qtimageformats5.6.0Qt
qtlocation5.6.0Qt
qtmultimedia5.6.0Qt
qtofficeopenxml02dda4a46f92…QtOfficeOpenXml
qtquickcontrols5.6.0Qt
qtquickcontrols25.6.0Qt
qtscript5.6.0Qt
qtsensors5.6.0Qt
qtserialport5.6.0Qt
qtserialport_qt45c3b6cc770Qt
qtservicead9bc46Qt Solutions
qtsparkle_qt48882e6ef86cd…qtsparkle
qtsvg5.6.0Qt
qtsystems4e3a7edQt
qttools5.6.0Qt
qttranslations5.6.0Qt
qtwebchannel5.6.0Qt
qtwebengine5.6.0Qt
qtwebkit5.6.0Qt
qtwebsockets5.6.0Qt
qtwebview5.6.0Qt
qtwinextras5.6.0Qt
qtxlsxwriterad90b6a2c21b…QtXlsxWriter
qtxmlpatterns5.6.0Qt
qwt6.1.1Qwt
qwt_qt46.1.1Qwt-qt4
qwtplot3d0.2.7QwtPlot3D
readline6.3Readline
rubberband1.8.1Rubberband
rucksack3.1.0rucksack
sdl1.2.15SDL
sdl_gfx2.0.25SDL_gfx
sdl_image1.2.12SDL_image
sdl_mixer1.2.12SDL_mixer
sdl_net1.2.8SDL_net
sdl_pango0.1.2SDL_Pango
sdl_rwhttp0.2.0SDL_rwhttp
sdl_sound1.0.3SDL_sound
sdl_ttf2.0.11SDL_ttf
sdl22.0.4SDL2
sdl2_gfx1.0.1SDL2_gfx
sdl2_image2.0.0SDL2_image
sdl2_mixer2.0.0SDL2_mixer
sdl2_net2.0.0sdl2_net
sdl2_ttf2.0.12SDL2_ttf
sfml2.3.2SFML
smpeg0.4.5+cvs200…smpeg
smpeg22.0.0smpeg
sox14.4.2SoX
sparsehash2.0.3sparsehash
speex1.2rc2Speex
speexdsp1.2rc3SpeexDSP
sqlite3120200SQLite
suitesparse4.2.1SuiteSparse
subversion1.9.2subversion
t4k_common0.1.1t4k_common
taglib1.10TagLib
tclap1.2.1tclap
teem1.11.0Teem
termcap1.3.1Termcap
theora1.1.1Theora
tiff4.0.6LibTIFF
tinyxml2.6.2tinyxml
tinyxml23.0.0tinyxml2
tre0.8.0TRE
twolame0.3.13TwoLAME
ucl1.03UCL
unrtf0.21.9unRTF
upx3.91UPX
vamp-plugin-sdk2.5Vamp Plugins SDK
vcdimager0.7.24vcdimager
vidstab0.98bvid.stab video stablizer
vigra1.9.0vigra
vmime87b0525VMime
vo-aacenc0.1.3VO-AACENC
vo-amrwbenc0.1.3VO-AMRWBENC
vorbis1.3.5Vorbis
vtk5.8.0vtk
vtk66.3.0VTK6
waf1.8.17Waf: the meta build system
wavpack4.75.2WavPack
wget1.17.1wget
widl4.0.6Wine IDL Compiler
winpcap4_1_3WinPcap
wt3.3.5Wt
wxwidgets3.0.2wxWidgets
x26420151011-224…x264
xapian-core1.2.21Xapian-Core
xerces3.1.2Xerces-C++
xmlrpc-cd4364f4xmlrpc-c
xmlwrapp0.7.0xmlwrapp
xorg-macros1.19.0X.org utility macros
xvidcore1.3.4xvidcore
xz5.2.2XZ
yasm1.3.0Yasm
zlib1.2.8zlib
zziplib0.13.62ZZIPlib


Guidelines for Creating Packages

The package should be a free software library that
is really used by one of your applications. Please also review our legal notes.

BTW, we're always curious about the applications people are porting. We maintain a list of projectswhich use MXE. No matter whether your project is free or proprietary – as long as it has its own website,
we'd be happy to link to it.

Also, feel free to link to us. :-)

Grep through the
src/*.mk
files to find a project that is most similar to yours. (Really,
grep
is your friend here.)

For instance, when adding a GNU library, you should take a package like gettext.mk orlibiconv.mk as
the base of your work. When using a SourceForge project, you could start with a copy of xmlwrapp.mk. And so on.

The GNU Make Standard Library is also available (though it should be unnecessary for most packages).

Adjust the comments, fill in the
$(PKG)_*
fields.

To fill the
$(PKG)_CHECKSUM
field, use a command such as (for file gettext.mk):

make update-checksum-gettext

or:

openssl sha256 pkg/gettext-x.y.z.tar.gz

if you have already downloaded the package.

Be especially careful with the
$(PKG)_DEPS
section. The easiest way to get the dependencies right is to start with a minimal setup. That is, initialize MXE with
make
gcc
only, then check whether your package builds successfully.

Always list the dependency on
gcc
explicitly:

$(PKG)_DEPS     := gcc ...

Things not to do:

do not run target executables with Wine, as Wine is not guaranteed to be installed. Instead build the needed tool natively or (if it is too huge to build one more time) add to MXE's dependencies. This policy
is forced by setting WINEPREFIX to an empty directory, which breaks Wine;
do not download anything while building, as all files downloaded should be verified by checksums. Instead create a package which installs the needed file. This policy is forced on Linux by LD_PRELOAD
trick, breaking network functions.

Add your package to the list of packages.

Each package gets its own table row element with table cells specifying your package name, official name and website:

<tr>
<td class="package">gettext</td>
<td class="website"><a href="https://www.gnu.org/software/gettext/">gettext</a></td>
</tr>

Always look for the SSL version of a website, that is, prefer
https://
URLs over
http://
URLs.

Write your
$(PKG)_BUILD
. If your library has a
./configure
script, enable/disable all dependency libraries explicitly via "
--enable-*
"
and "
--disable-*
" options.

You might also have to provide a patch for it. In that case, have a look at other patches such assdl2-2-libtool.patch. In particular, each patch file should be
named as:

PACKAGE-PATCHNUMBER-DESCRIPTION.patch

and should start with:

This file is part of MXE.
See index.html for further information.

This patch has been taken from: https://...[/code] where the URL points to the bugtracker entry, mailing list entry or website you took the patch from.

If you created the patch yourself, please offer it to the upstream project first, and point to thatURL, using the same wording: "This patch has been taken from:".

Depending on the feedback you get from the upstream project, you might want to improve your patch.

If you find some time, please provide a minimal test program for it. It should be simple, stand alone and should work unmodified for many (all?) future versions of the library. Test programs are named as:

PACKAGE-test.c

or
PACKAGE-test.cpp

depending on whether it is a C or C++ library. To get a clue, please have a look at existing test programs such as sdl-test.c.

At the very end of your
*.mk
file you should build the test program in a generic way, using strict compiler flags. The last few lines of sdl.mk will
give you a clue.

You could also try to provide a
$(PKG)_UPDATE
section. However, that requires some experience and "feeling" for it. So it is perfectly okay if you leave a placeholder:

define $(PKG)_UPDATE
echo 'TODO: write update script for $(PKG).' >&2;
echo $($(PKG)_VERSION)
endef

We'll fill that in for you. It's a funny exercise.

Check that you don't have "dirty stuff" in your
*.mk
files, such as TAB characters or trailing spaces at lines endings. Run:

make cleanup-style

to remove these. Have a look at random
*.mk
files to get a feeling for the coding style.

The same holds for your test program.

However, patch files should always appear in the same coding style as the files they are patching.

When patching sources with crlf line endings, the patch file itself should also have the same eol style. Use the convention of naming the file as
*crlf.patch
to instruct git not to normalise the line
endings (defined in
.gitattributes
).

Finally, in your
$(PKG)_BUILD
section, please check that you use our portability variables:

bash
$(SHELL)
date
$(DATE)
install
$(INSTALL)
libtool
$(LIBTOOL)
libtoolize
$(LIBTOOLIZE)
make
$(MAKE)
patch
$(PATCH)
sed
$(SED)
sort
$(SORT)
wget
$(WGET)
Check whether everything runs fine. If you have some trouble, don't hesitate to ask on the mailing list, providing your
*.mk
file
so far.

Issue a pull request to propose your final
*.mk
file to us. If you have trouble with pull requests, send your file
to the mailing list instead.

Either way, don't forget to tell us if there are some pieces in your
*.mk
file you feel unsure about. We'll then have a specific look at those parts, which avoids trouble for you and us in the future.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: