Files
haikuports/dev-util/dj64/dj64-0.3.0~0.recipe
2025-07-13 19:33:35 +02:00

81 lines
2.3 KiB
Bash

SUMMARY="Development suite that allows to cross-build 64-bit programs for DOS"
DESCRIPTION="dj64 is a 64-bit tool-chain that compiles the djgpp-buildable sources for DOS. \
There are the following differences with djgpp:
- dj64 produces 64-bit code, djgpp produces 32-bit
- dj64 uses ELF file format, djgpp uses COFF
- dj64 allows to use host's gdb, djgpp uses some old DOS port of gdb
- preliminary unicode support
- mostly complete BSD sockets support
- out-of-the-box ncurses support
The resulting programs run on the emulated DOS environment, with eg dosemu2 emulator. In theory \
the 64-bit DOS extender can be written to run such programs under the bare-metal DOS, but the \
future of DOS is probably in the emulated environments anyway."
HOMEPAGE="https://github.com/stsp/dj64dev"
COPYRIGHT="2024 Stas Sergeev, 19??-2024 DJ Delorie and others"
LICENSE="GNU GPL v3"
SOURCE_URI="https://github.com/stsp/dj64dev/archive/1033bdad7d8df3224052be966970a916575f2db2.tar.gz"
SOURCE_DIR="dj64dev-1033bdad7d8df3224052be966970a916575f2db2"
CHECKSUM_SHA256="68180cef48aef749119070068b8cf5ddbaf83ad893a6888536c42de0e94b1857"
REVISION="3"
PATCHES="dj64-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
dj64$secondaryArchSuffix = $portVersion
lib:libdj64$secondaryArchSuffix
lib:libdjdev64$secondaryArchSuffix
lib:libdjstub64$secondaryArchSuffix
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libelf$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libelf$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:autoreconf
cmd:ctags
cmd:readtags
cmd:djlink
cmd:gcc$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:smlrcc
cmd:thunk_gen >= 1.6
libtool
"
targetArch="i386-pc-dj64"
relativeInstallDir="develop/tools/"
installDir="$prefix/$relativeInstallDir"
BUILD()
{
# Official instructions are to just run make (it will run configure if needed), but we need to
# pass options to configure for installation paths, etc.
autoreconf -v -i -I m4
export CFLAGS="-O2 -DRTLD_DEEPBIND=RTLD_GROUP"
runConfigure --omit-dirs prefix ./configure --prefix=$installDir
# ncurses build needs TERMINFO to be set, otherwise it tries to write into system directories.
export TERMINFO=/tmp
make $jobArgs
}
INSTALL()
{
make install
cp $installDir/i386-pc-dj64/lib64/libdj64.so* $libDir
}