806 lines
29 KiB
Diff
806 lines
29 KiB
Diff
Index: Makefile
|
|
===================================================================
|
|
RCS file: /cvs/ports/lang/dmd/Makefile,v
|
|
retrieving revision 1.5
|
|
diff -u -p -r1.5 Makefile
|
|
--- Makefile 11 Mar 2022 19:28:54 -0000 1.5
|
|
+++ Makefile 12 Mar 2022 16:22:12 -0000
|
|
@@ -1,14 +1,13 @@
|
|
# i386 forthcoming
|
|
ONLY_FOR_ARCHS = amd64
|
|
|
|
-V = 2.098.0
|
|
+V = 2.099.0
|
|
COMMENT = reference compiler for the D programming language
|
|
-DISTFILES = dmd-${V}.tar.gz \
|
|
- dmd-${V}-bootstrap-p0.tar.gz \
|
|
- druntime-${V}.tar.gz \
|
|
- phobos-${V}.tar.gz
|
|
+DISTFILES = dmd-${V}{v${V}}.tar.gz:1 \
|
|
+ dmd-${V}-bootstrap.tar.gz:0 \
|
|
+ druntime-${V}{v${V}}.tar.gz:2 \
|
|
+ phobos-${V}{v${V}}.tar.gz:3
|
|
PKGNAME = dmd-${V}
|
|
-REVISION = 0
|
|
CATEGORIES = lang
|
|
|
|
HOMEPAGE = https://dlang.org/
|
|
@@ -19,12 +18,15 @@ PERMIT_PACKAGE = Yes
|
|
|
|
WANTLIB += c c++abi execinfo m pthread
|
|
|
|
-MASTER_SITES = https://github.com/ibara/dmd/releases/download/bootstrap-${V}/
|
|
+MASTER_SITES0 = https://github.com/ibara/dmd/releases/download/bootstrap-${V}/
|
|
+MASTER_SITES1 = https://github.com/dlang/dmd/archive/refs/tags/
|
|
+MASTER_SITES2 = https://github.com/dlang/druntime/archive/refs/tags/
|
|
+MASTER_SITES3 = https://github.com/dlang/phobos/archive/refs/tags/
|
|
|
|
USE_GMAKE = Yes
|
|
MAKE_ENV = HOST_CXX="${CXX}" \
|
|
- HOST_DMD="${WRKDIR}/dmd-${V}-bootstrap/openbsd/bin${MODEL}/dmd" \
|
|
- LD_LIBRARY_PATH="${WRKSRC}/dmd-${V}-bootstrap/openbsd/bin${MODEL}"
|
|
+ HOST_DMD="${WRKDIR}/dmd-bootstrap/openbsd/bin${MODEL}/dmd" \
|
|
+ LD_LIBRARY_PATH="${WRKSRC}/dmd-bootstrap/openbsd/bin${MODEL}"
|
|
MAKE_FILE = posix.mak
|
|
|
|
NO_TEST = Yes
|
|
@@ -36,23 +38,23 @@ MODEL = 64
|
|
MODEL = 32
|
|
.endif
|
|
|
|
-# Fix up the build system.
|
|
-do-gen:
|
|
- sed -i "s,TOPDIR,${WRKDIR},g" \
|
|
- ${WRKDIR}/druntime-${V}/posix.mak \
|
|
- ${WRKDIR}/phobos-${V}/posix.mak
|
|
+# Prevent churn.
|
|
+post-extract:
|
|
+ mv ${WRKSRC}/dmd-${V} ${WRKSRC}/dmd
|
|
+ mv ${WRKSRC}/druntime-${V} ${WRKSRC}/druntime
|
|
+ mv ${WRKSRC}/phobos-${V} ${WRKSRC}/phobos
|
|
|
|
# We need to do this manually.
|
|
# Yes, this is all really correct.
|
|
do-build:
|
|
- cd ${WRKDIR}/phobos-${V} && \
|
|
+ cd ${WRKDIR}/phobos && \
|
|
${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} -f ${MAKE_FILE} && \
|
|
${SETENV} ${MAKE_PROGRAM} -f ${MAKE_FILE} install
|
|
- cd ${WRKDIR}/druntime-${V} && \
|
|
+ cd ${WRKDIR}/druntime && \
|
|
${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} -f ${MAKE_FILE} && \
|
|
${SETENV} ${MAKE_PROGRAM} -f ${MAKE_FILE} install
|
|
mkdir ${WRKDIR}/install/openbsd/bin${MODEL}
|
|
- cp ${WRKDIR}/dmd-${V}/generated/openbsd/release/${MODEL}/dmd \
|
|
+ cp ${WRKDIR}/dmd/generated/openbsd/release/${MODEL}/dmd \
|
|
${WRKDIR}/install/openbsd/bin${MODEL}
|
|
|
|
# We need to do this manually too.
|
|
@@ -61,8 +63,8 @@ do-install:
|
|
${PREFIX}/bin
|
|
${INSTALL_DATA} ${WRKDIR}/install/openbsd/lib${MODEL}/libphobos2.a \
|
|
${PREFIX}/lib
|
|
- ${INSTALL_MAN} ${WRKDIR}/dmd-${V}/dmd.1 ${PREFIX}/man/man1
|
|
- ${INSTALL_MAN} ${WRKDIR}/dmd-${V}/docs/man/man5/dmd.conf.5 \
|
|
+ ${INSTALL_MAN} ${WRKDIR}/dmd-bootstrap/dmd.1 ${PREFIX}/man/man1
|
|
+ ${INSTALL_MAN} ${WRKDIR}/dmd/docs/man/man5/dmd.conf.5 \
|
|
${PREFIX}/man/man5
|
|
${INSTALL_DATA_DIR} ${PREFIX}/include/dmd
|
|
cp -R ${WRKDIR}/install/src/{druntime,phobos} ${PREFIX}/include/dmd
|
|
@@ -70,7 +72,7 @@ do-install:
|
|
${INSTALL_DATA} ${WRKDIR}/install/phobos-LICENSE.txt \
|
|
${PREFIX}/share/doc/dmd/LICENSE.txt
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/dmd
|
|
- cp -R ${WRKDIR}/dmd-${V}/samples/* ${PREFIX}/share/examples/dmd
|
|
+ cp -R ${WRKDIR}/dmd/samples/* ${PREFIX}/share/examples/dmd
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/dmd
|
|
${SUBST_CMD} -c -m 444 ${FILESDIR}/dmd.conf \
|
|
${PREFIX}/share/dmd/dmd.conf
|
|
Index: distinfo
|
|
===================================================================
|
|
RCS file: /cvs/ports/lang/dmd/distinfo,v
|
|
retrieving revision 1.3
|
|
diff -u -p -r1.3 distinfo
|
|
--- distinfo 29 Nov 2021 01:23:22 -0000 1.3
|
|
+++ distinfo 12 Mar 2022 16:22:12 -0000
|
|
@@ -1,8 +1,8 @@
|
|
-SHA256 (dmd-2.098.0-bootstrap-p0.tar.gz) = wjPmbUtDh6UBPMphduS4pr8LVLb99E0NfpIJpjw5M20=
|
|
-SHA256 (dmd-2.098.0.tar.gz) = PcjGCztmfGCUtJselt3795Di9Sy43P6wBaSamM8haqY=
|
|
-SHA256 (druntime-2.098.0.tar.gz) = 427NFmgYFramws7kWk/+HRWf0HUCSeGsOB7epahEx6I=
|
|
-SHA256 (phobos-2.098.0.tar.gz) = S/fIj+0Uh1VRVpeTErcblgnpHdO4eIBNcVkkKW4NWbo=
|
|
-SIZE (dmd-2.098.0-bootstrap-p0.tar.gz) = 11521977
|
|
-SIZE (dmd-2.098.0.tar.gz) = 3759833
|
|
-SIZE (druntime-2.098.0.tar.gz) = 1864644
|
|
-SIZE (phobos-2.098.0.tar.gz) = 2444864
|
|
+SHA256 (dmd-2.099.0-bootstrap.tar.gz) = zOgJZmP67jnx/c5SbCm7YiL7lnyrSsE9MpuknqA9xF4=
|
|
+SHA256 (dmd-2.099.0.tar.gz) = jIV1sraLff4jb+wTu98m0GM2W07QhWMyD0KbICxbii4=
|
|
+SHA256 (druntime-2.099.0.tar.gz) = 3h+a58FYBrzRRZ1Wx6xyFkef+I9aOw6og9UNY599/EI=
|
|
+SHA256 (phobos-2.099.0.tar.gz) = EAdcdo1aX7PgPwROq+5W6/eIm+jby8IZYwDD4jqvovc=
|
|
+SIZE (dmd-2.099.0-bootstrap.tar.gz) = 9975650
|
|
+SIZE (dmd-2.099.0.tar.gz) = 3878279
|
|
+SIZE (druntime-2.099.0.tar.gz) = 1880109
|
|
+SIZE (phobos-2.099.0.tar.gz) = 2470150
|
|
Index: patches/patch-dmd-2_098_0-bootstrap_openbsd_bin64_dmd_conf
|
|
===================================================================
|
|
RCS file: patches/patch-dmd-2_098_0-bootstrap_openbsd_bin64_dmd_conf
|
|
diff -N patches/patch-dmd-2_098_0-bootstrap_openbsd_bin64_dmd_conf
|
|
--- patches/patch-dmd-2_098_0-bootstrap_openbsd_bin64_dmd_conf 11 Mar 2022 19:28:54 -0000 1.2
|
|
+++ /dev/null 1 Jan 1970 00:00:00 -0000
|
|
@@ -1,11 +0,0 @@
|
|
-Use the bootstrap libphobos2.a when linking the initially built dmd.
|
|
-
|
|
-Index: dmd-2.098.0-bootstrap/openbsd/bin64/dmd.conf
|
|
---- dmd-2.098.0-bootstrap/openbsd/bin64/dmd.conf.orig
|
|
-+++ dmd-2.098.0-bootstrap/openbsd/bin64/dmd.conf
|
|
-@@ -2,4 +2,4 @@
|
|
- DFLAGS=-I/usr/local/include/dmd/phobos -I/usr/local/include/dmd/druntime/import -L-L/usr/lib -L-L/usr/local/lib -L--export-dynamic -fPIC
|
|
-
|
|
- [Environment64]
|
|
--DFLAGS=-I/usr/local/include/dmd/phobos -I/usr/local/include/dmd/druntime/import -L-L/usr/lib -L-L/usr/local/lib -L--export-dynamic -fPIC
|
|
-+DFLAGS=-I%@P%/../../../druntime-2.098.0/src -I%@P%/../../../phobos-2.098.0 -L-L%@P%/../../../phobos-2.098.0/generated/openbsd/release/64 -L--export-dynamic -fPIC -L-L%@P%/../../../dmd-2.098.0-bootstrap/openbsd/lib64
|
|
Index: patches/patch-dmd-2_098_0_dmd_1
|
|
===================================================================
|
|
RCS file: patches/patch-dmd-2_098_0_dmd_1
|
|
diff -N patches/patch-dmd-2_098_0_dmd_1
|
|
--- patches/patch-dmd-2_098_0_dmd_1 11 Mar 2022 19:28:54 -0000 1.2
|
|
+++ /dev/null 1 Jan 1970 00:00:00 -0000
|
|
@@ -1,269 +0,0 @@
|
|
-Pre-gen'd manual page for dmd.1
|
|
-
|
|
-Index: dmd-2.098.0/dmd.1
|
|
---- dmd-2.098.0/dmd.1.orig
|
|
-+++ dmd-2.098.0/dmd.1
|
|
-@@ -0,0 +1,263 @@
|
|
-+.TH DMD 1 "2021-10-13" "The D Language Foundation" "The D Language Foundation"
|
|
-+.SH NAME
|
|
-+dmd \- Digital Mars D2.x Compiler
|
|
-+.SH SYNOPSIS
|
|
-+.B dmd \fIfiles\fR ... [ \fI-switch\fR ... ]
|
|
-+.SH DESCRIPTION
|
|
-+.B dmd
|
|
-+Compiles source code written in the D programming language.
|
|
-+.SH OPTIONS
|
|
-+.IP "file, file.d, file.htm, file.html"
|
|
-+D source files to compile
|
|
-+.IP file.di
|
|
-+D interface files
|
|
-+.IP file.o
|
|
-+Object files to link in
|
|
-+.IP file.a
|
|
-+Library files to link in
|
|
-+.IP @cmdfile
|
|
-+A file to read more command-line arguments from,
|
|
-+which may contain # single-line comments
|
|
-+.IP -allinst
|
|
-+Generate code for all template instantiations
|
|
-+.IP -betterC
|
|
-+Omit generating some runtime information and helper functions
|
|
-+.IP -boundscheck=[on|safeonly|off]
|
|
-+Bounds checks on, in @safe only, or off
|
|
-+.IP -c
|
|
-+Compile only, do not link
|
|
-+.IP -check=[assert|bounds|in|invariant|out|switch][=[on|off]]
|
|
-+Enable or disable specific checks
|
|
-+.IP -check=[h|help|?]
|
|
-+List information on all available checks
|
|
-+.IP -checkaction=[D|C|halt|context]
|
|
-+Behavior on assert/boundscheck/finalswitch failure
|
|
-+.IP -checkaction=[h|help|?]
|
|
-+List information on all available check actions
|
|
-+.IP -color
|
|
-+Turn colored console output on
|
|
-+.IP -color=[on|off|auto]
|
|
-+Force colored console output on or off, or only when not redirected (default)
|
|
-+.IP -conf=\fIfilename\fR
|
|
-+Use config file at \fIfilename\fR
|
|
-+.IP -cov
|
|
-+Do code coverage analysis
|
|
-+.IP -cov=ctfe
|
|
-+Include code executed during CTFE in coverage report
|
|
-+.IP -cov=\fInnn\fR
|
|
-+Require at least nnn% code coverage
|
|
-+.IP -D
|
|
-+Generate documentation
|
|
-+.IP -Dd\fIdirectory\fR
|
|
-+Write documentation file to \fIdirectory\fR
|
|
-+.IP -Df\fIfilename\fR
|
|
-+Write documentation file to \fIfilename\fR
|
|
-+.IP -d
|
|
-+Silently allow deprecated features and symbols
|
|
-+.IP -de
|
|
-+Issue an error when deprecated features or symbols are used (halt compilation)
|
|
-+.IP -dw
|
|
-+Issue a message when deprecated features or symbols are used (default)
|
|
-+.IP -debug
|
|
-+Compile in debug code
|
|
-+.IP -debug=\fIlevel\fR
|
|
-+Compile in debug code <= \fIlevel\fR
|
|
-+.IP -debug=\fIident\fR
|
|
-+Compile in debug code identified by \fIident\fR
|
|
-+.IP -debuglib=\fIname\fR
|
|
-+Set symbolic debug library to \fIname\fR
|
|
-+.IP -defaultlib=\fIname\fR
|
|
-+Set default library to \fIname\fR
|
|
-+.IP -deps
|
|
-+Print module dependencies (imports/file/version/debug/lib)
|
|
-+.IP -deps=\fIfilename\fR
|
|
-+Write module dependencies to \fIfilename\fR (only imports)
|
|
-+.IP -extern-std=\fIstandard\fR
|
|
-+Set C++ name mangling compatibility with \fIstandard\fR
|
|
-+.IP -extern-std=[h|help|?]
|
|
-+List all supported standards
|
|
-+.IP -fPIC
|
|
-+Generate position independent code
|
|
-+.IP -fPIE
|
|
-+Generate position independent executables
|
|
-+.IP -g
|
|
-+Add symbolic debug info
|
|
-+.IP -gdwarf=\fIversion\fR
|
|
-+Add DWARF symbolic debug info
|
|
-+.IP -gf
|
|
-+Emit debug info for all referenced types
|
|
-+.IP -gs
|
|
-+Always emit stack frame
|
|
-+.IP -gx
|
|
-+Add stack stomp code
|
|
-+.IP -H
|
|
-+Generate 'header' file
|
|
-+.IP -Hd=\fIdirectory\fR
|
|
-+Write 'header' file to \fIdirectory\fR
|
|
-+.IP -Hf=\fIfilename\fR
|
|
-+Write 'header' file to \fIfilename\fR
|
|
-+.IP -HC[=[silent|verbose]]
|
|
-+Generate C++ 'header' file
|
|
-+.IP -HC=[?|h|help]
|
|
-+List available modes for C++ 'header' file generation
|
|
-+.IP -HCd=\fIdirectory\fR
|
|
-+Write C++ 'header' file to \fIdirectory\fR
|
|
-+.IP -HCf=\fIfilename\fR
|
|
-+Write C++ 'header' file to \fIfilename\fR
|
|
-+.IP --help
|
|
-+Print help and exit
|
|
-+.IP -I=\fIdirectory\fR
|
|
-+Look for imports also in \fIdirectory\fR
|
|
-+.IP -i[=\fIpattern\fR]
|
|
-+Include imported modules in the compilation
|
|
-+.IP -ignore
|
|
-+Ignore unsupported pragmas
|
|
-+.IP -inline
|
|
-+Do function inlining
|
|
-+.IP -J=\fIdirectory\fR
|
|
-+Look for string imports also in \fIdirectory\fR
|
|
-+.IP -L=\fIlinkerflag\fR
|
|
-+Pass \fIlinkerflag\fR to link
|
|
-+.IP -lib
|
|
-+Generate library rather than object files
|
|
-+.IP -lowmem
|
|
-+Enable garbage collection for the compiler
|
|
-+.IP -m32
|
|
-+Generate 32 bit code
|
|
-+.IP -m64
|
|
-+Generate 64 bit code
|
|
-+.IP -main
|
|
-+Add default main() if not present already (e.g. for unittesting)
|
|
-+.IP -makedeps[=\fIfilename\fR]
|
|
-+Print dependencies in Makefile compatible format to \fIfilename\fR or stdout.
|
|
-+.IP -man
|
|
-+Open web browser on manual page
|
|
-+.IP -map
|
|
-+Generate linker .map file
|
|
-+.IP -mcpu=\fIid\fR
|
|
-+Generate instructions for architecture identified by \fIid\fR
|
|
-+.IP -mcpu=[h|help|?]
|
|
-+List all architecture options
|
|
-+.IP -mixin=\fIfilename\fR
|
|
-+Expand and save mixins to file specified by \fIfilename\fR
|
|
-+.IP -mv=\fIpackage.module\fR=<filespec>
|
|
-+Use <filespec> as source file for \fIpackage.module\fR
|
|
-+.IP -noboundscheck
|
|
-+No array bounds checking (deprecated, use -boundscheck=off)
|
|
-+.IP -O
|
|
-+Optimize
|
|
-+.IP -o-
|
|
-+Do not write object file
|
|
-+.IP -od=\fIdirectory\fR
|
|
-+Write object & library files to \fIdirectory\fR
|
|
-+.IP -of=\fIfilename\fR
|
|
-+Name output file to \fIfilename\fR
|
|
-+.IP -op
|
|
-+Preserve source path for output files
|
|
-+.IP -preview=\fIname\fR
|
|
-+Enable an upcoming language change identified by \fIname\fR
|
|
-+.IP -preview=[h|help|?]
|
|
-+List all upcoming language changes
|
|
-+.IP -profile
|
|
-+Profile runtime performance of generated code
|
|
-+.IP -profile=gc
|
|
-+Profile runtime allocations
|
|
-+.IP -release
|
|
-+Compile release version
|
|
-+.IP -revert=\fIname\fR
|
|
-+Revert language change identified by \fIname\fR
|
|
-+.IP -revert=[h|help|?]
|
|
-+List all revertable language changes
|
|
-+.IP -run \fIsrcfile\fR
|
|
-+Compile, link, and run the program \fIsrcfile\fR
|
|
-+.IP -shared
|
|
-+Generate shared library (DLL)
|
|
-+.IP -target=\fItriple\fR
|
|
-+Use \fItriple\fR as <arch>-[<vendor>-]<os>[-<cenv>[-<cppenv]]
|
|
-+.IP -transition=\fIname\fR
|
|
-+Help with language change identified by \fIname\fR
|
|
-+.IP -transition=[h|help|?]
|
|
-+List all language changes
|
|
-+.IP -unittest
|
|
-+Compile in unit tests
|
|
-+.IP -v
|
|
-+Verbose
|
|
-+.IP -vcolumns
|
|
-+Print character (column) numbers in diagnostics
|
|
-+.IP -verror-style=[digitalmars|gnu]
|
|
-+Set the style for file/line number annotations on compiler messages
|
|
-+.IP -verrors=\fInum\fR
|
|
-+Limit the number of error messages (0 means unlimited)
|
|
-+.IP -verrors=context
|
|
-+Show error messages with the context of the erroring source line
|
|
-+.IP -verrors=spec
|
|
-+Show errors from speculative compiles such as __traits(compiles,...)
|
|
-+.IP --version
|
|
-+Print compiler version and exit
|
|
-+.IP -version=\fIlevel\fR
|
|
-+Compile in version code >= \fIlevel\fR
|
|
-+.IP -version=\fIident\fR
|
|
-+Compile in version code identified by \fIident\fR
|
|
-+.IP -vgc
|
|
-+List all gc allocations including hidden ones
|
|
-+.IP -vtls
|
|
-+List all variables going into thread local storage
|
|
-+.IP -vtemplates=[list-instances]
|
|
-+List statistics on template instantiations
|
|
-+.IP -w
|
|
-+Warnings as errors (compilation will halt)
|
|
-+.IP -wi
|
|
-+Warnings as messages (compilation will continue)
|
|
-+.IP -X
|
|
-+Generate JSON file
|
|
-+.IP -Xf=\fIfilename\fR
|
|
-+Write JSON file to \fIfilename\fR
|
|
-+.IP -Xcc=\fIdriverflag\fR
|
|
-+Pass \fIdriverflag\fR to linker driver (cc)
|
|
-+.SH TRANSITIONS
|
|
-+Language changes listed by \fB-transition=id\fR:
|
|
-+.IP \fIfield\fR
|
|
-+List all non-mutable fields which occupy an object instance
|
|
-+.IP \fItls\fR
|
|
-+List all variables going into thread local storage
|
|
-+.IP \fIvmarkdown\fR
|
|
-+List instances of Markdown replacements in Ddoc
|
|
-+.SH LINKING
|
|
-+Linking is done directly by the
|
|
-+.B dmd
|
|
-+compiler after a successful compile. To prevent
|
|
-+.B dmd
|
|
-+from running the linker, use the
|
|
-+.B -c
|
|
-+switch.
|
|
-+.PP
|
|
-+The actual linking is done by running \fBgcc\fR.
|
|
-+This ensures compatibility with modules compiled with
|
|
-+\fBgcc\fR.
|
|
-+.SH FILES
|
|
-+.I /etc/dmd.conf
|
|
-+dmd will look for the initialization file
|
|
-+.I dmd.conf
|
|
-+in the directory \fI/etc\fR.
|
|
-+If found, environment variable settings in the file will
|
|
-+override any existing settings.
|
|
-+.SH ENVIRONMENT
|
|
-+The D compiler dmd uses the following environment
|
|
-+variables:
|
|
-+.IP DFLAGS 10
|
|
-+The value of
|
|
-+.B DFLAGS
|
|
-+is treated as if it were appended on the command line to
|
|
-+\fBdmd\fR.
|
|
-+.SH AUTHOR
|
|
-+Copyright (c) 1999-2021 by The D Language Foundation written by Walter Bright
|
|
-+.SH "ONLINE DOCUMENTATION"
|
|
-+.UR https://dlang.org/dmd.html
|
|
-+https://dlang.org/dmd.html
|
|
-+.UE
|
|
-+.SH "SEE ALSO"
|
|
-+.BR dmd.conf (5)
|
|
-+.BR rdmd (1)
|
|
-+.BR dumpobj (1)
|
|
-+.BR obj2asm (1)
|
|
-+.BR gcc (1)
|
|
Index: patches/patch-dmd-2_098_0_posix_mak
|
|
===================================================================
|
|
RCS file: patches/patch-dmd-2_098_0_posix_mak
|
|
diff -N patches/patch-dmd-2_098_0_posix_mak
|
|
--- patches/patch-dmd-2_098_0_posix_mak 11 Mar 2022 19:28:54 -0000 1.2
|
|
+++ /dev/null 1 Jan 1970 00:00:00 -0000
|
|
@@ -1,9 +0,0 @@
|
|
-Index: dmd-2.098.0/posix.mak
|
|
---- dmd-2.098.0/posix.mak.orig
|
|
-+++ dmd-2.098.0/posix.mak
|
|
-@@ -1,4 +1,4 @@
|
|
--INSTALL_DIR=$(PWD)/../install
|
|
-+INSTALL_DIR=../install
|
|
- ECTAGS_LANGS = Make,C,C++,D,Sh
|
|
- ECTAGS_FILES = src/dmd/*.[chd] src/dmd/backend/*.[chd] src/dmd/root/*.[chd]
|
|
-
|
|
Index: patches/patch-dmd-2_098_0_src_dmd_link_d
|
|
===================================================================
|
|
RCS file: patches/patch-dmd-2_098_0_src_dmd_link_d
|
|
diff -N patches/patch-dmd-2_098_0_src_dmd_link_d
|
|
--- patches/patch-dmd-2_098_0_src_dmd_link_d 11 Mar 2022 19:28:54 -0000 1.2
|
|
+++ /dev/null 1 Jan 1970 00:00:00 -0000
|
|
@@ -1,14 +0,0 @@
|
|
-https://github.com/dlang/dmd/pull/13157
|
|
-
|
|
-Index: dmd-2.098.0/src/dmd/link.d
|
|
---- dmd-2.098.0/src/dmd/link.d.orig
|
|
-+++ dmd-2.098.0/src/dmd/link.d
|
|
-@@ -751,6 +751,8 @@ public int runLINK()
|
|
- {
|
|
- // Link against -lc++abi for Unwind symbols
|
|
- argv.push("-lc++abi");
|
|
-+ // Links against -lexecinfo for backtrace symbols
|
|
-+ argv.push("-lexecinfo");
|
|
- }
|
|
- if (global.params.verbose)
|
|
- {
|
|
Index: patches/patch-dmd-bootstrap_openbsd_bin64_dmd_conf
|
|
===================================================================
|
|
RCS file: patches/patch-dmd-bootstrap_openbsd_bin64_dmd_conf
|
|
diff -N patches/patch-dmd-bootstrap_openbsd_bin64_dmd_conf
|
|
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
|
+++ patches/patch-dmd-bootstrap_openbsd_bin64_dmd_conf 12 Mar 2022 16:22:12 -0000
|
|
@@ -0,0 +1,11 @@
|
|
+Use the bootstrap libphobos2.a when linking the initially built dmd.
|
|
+
|
|
+Index: dmd-bootstrap/openbsd/bin64/dmd.conf
|
|
+--- dmd-bootstrap/openbsd/bin64/dmd.conf.orig
|
|
++++ dmd-bootstrap/openbsd/bin64/dmd.conf
|
|
+@@ -2,4 +2,4 @@
|
|
+ DFLAGS=-I${TRUEPREFIX}/include/dmd/phobos -I${TRUEPREFIX}/include/dmd/druntime/import -L-L/usr/lib -L-L${TRUEPREFIX}/lib -L--export-dynamic -fPIC
|
|
+
|
|
+ [Environment64]
|
|
+-DFLAGS=-I${TRUEPREFIX}/include/dmd/phobos -I${TRUEPREFIX}/include/dmd/druntime/import -L-L/usr/lib -L-L${TRUEPREFIX}/lib -L--export-dynamic -fPIC
|
|
++DFLAGS=-I%@P%/../../../druntime/src -I%@P%/../../../phobos -L-L%@P%/../../../phobos/generated/openbsd/release/64 -L--export-dynamic -fPIC -L-L%@P%/../../../dmd-bootstrap/openbsd/lib64
|
|
Index: patches/patch-dmd_posix_mak
|
|
===================================================================
|
|
RCS file: patches/patch-dmd_posix_mak
|
|
diff -N patches/patch-dmd_posix_mak
|
|
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
|
+++ patches/patch-dmd_posix_mak 12 Mar 2022 16:22:12 -0000
|
|
@@ -0,0 +1,9 @@
|
|
+Index: dmd/posix.mak
|
|
+--- dmd/posix.mak.orig
|
|
++++ dmd/posix.mak
|
|
+@@ -1,4 +1,4 @@
|
|
+-INSTALL_DIR=$(PWD)/../install
|
|
++INSTALL_DIR=../install
|
|
+ ECTAGS_LANGS = Make,C,C++,D,Sh
|
|
+ ECTAGS_FILES = src/dmd/*.[chd] src/dmd/backend/*.[chd] src/dmd/root/*.[chd]
|
|
+
|
|
Index: patches/patch-druntime-2_098_0_mak_COPY
|
|
===================================================================
|
|
RCS file: patches/patch-druntime-2_098_0_mak_COPY
|
|
diff -N patches/patch-druntime-2_098_0_mak_COPY
|
|
--- patches/patch-druntime-2_098_0_mak_COPY 11 Mar 2022 19:28:54 -0000 1.2
|
|
+++ /dev/null 1 Jan 1970 00:00:00 -0000
|
|
@@ -1,17 +0,0 @@
|
|
-Make sure these get installed.
|
|
-
|
|
-Index: druntime-2.098.0/mak/COPY
|
|
---- druntime-2.098.0/mak/COPY.orig
|
|
-+++ druntime-2.098.0/mak/COPY
|
|
-@@ -258,9 +258,11 @@ COPY=\
|
|
- \
|
|
- $(IMPDIR)\core\sys\openbsd\dlfcn.d \
|
|
- $(IMPDIR)\core\sys\openbsd\err.d \
|
|
-+ $(IMPDIR)\core\sys\openbsd\execinfo.d \
|
|
- $(IMPDIR)\core\sys\openbsd\stdlib.d \
|
|
- $(IMPDIR)\core\sys\openbsd\string.d \
|
|
- $(IMPDIR)\core\sys\openbsd\time.d \
|
|
-+ $(IMPDIR)\core\sys\openbsd\unistd.d \
|
|
- \
|
|
- $(IMPDIR)\core\sys\openbsd\sys\cdefs.d \
|
|
- $(IMPDIR)\core\sys\openbsd\sys\elf.d \
|
|
Index: patches/patch-druntime-2_098_0_mak_SRCS
|
|
===================================================================
|
|
RCS file: patches/patch-druntime-2_098_0_mak_SRCS
|
|
diff -N patches/patch-druntime-2_098_0_mak_SRCS
|
|
--- patches/patch-druntime-2_098_0_mak_SRCS 11 Mar 2022 19:28:54 -0000 1.2
|
|
+++ /dev/null 1 Jan 1970 00:00:00 -0000
|
|
@@ -1,17 +0,0 @@
|
|
-Make sure these get installed.
|
|
-
|
|
-Index: druntime-2.098.0/mak/SRCS
|
|
---- druntime-2.098.0/mak/SRCS.orig
|
|
-+++ druntime-2.098.0/mak/SRCS
|
|
-@@ -259,9 +259,11 @@ SRCS=\
|
|
- \
|
|
- src\core\sys\openbsd\dlfcn.d \
|
|
- src\core\sys\openbsd\err.d \
|
|
-+ src\core\sys\openbsd\execinfo.d \
|
|
- src\core\sys\openbsd\stdlib.d \
|
|
- src\core\sys\openbsd\string.d \
|
|
- src\core\sys\openbsd\time.d \
|
|
-+ src\core\sys\openbsd\unistd.d \
|
|
- \
|
|
- src\core\sys\openbsd\sys\cdefs.d \
|
|
- src\core\sys\openbsd\sys\elf.d \
|
|
Index: patches/patch-druntime-2_098_0_posix_mak
|
|
===================================================================
|
|
RCS file: patches/patch-druntime-2_098_0_posix_mak
|
|
diff -N patches/patch-druntime-2_098_0_posix_mak
|
|
--- patches/patch-druntime-2_098_0_posix_mak 11 Mar 2022 19:28:54 -0000 1.2
|
|
+++ /dev/null 1 Jan 1970 00:00:00 -0000
|
|
@@ -1,42 +0,0 @@
|
|
-Index: druntime-2.098.0/posix.mak
|
|
---- druntime-2.098.0/posix.mak.orig
|
|
-+++ druntime-2.098.0/posix.mak
|
|
-@@ -5,7 +5,7 @@
|
|
-
|
|
- QUIET:=
|
|
-
|
|
--DMD_DIR=../dmd
|
|
-+DMD_DIR=TOPDIR/dmd-2.098.0
|
|
- DUB=dub
|
|
- TOOLS_DIR=../tools
|
|
-
|
|
-@@ -64,11 +64,9 @@ MAKEFILE = $(firstword $(MAKEFILE_LIST))
|
|
- DDOCFLAGS=-conf= -c -w -o- -Isrc -Iimport -version=CoreDdoc
|
|
-
|
|
- # Set CFLAGS
|
|
--CFLAGS=$(MODEL_FLAG) -fPIC -DHAVE_UNISTD_H
|
|
-+CFLAGS+=$(MODEL_FLAG) -fPIC -DHAVE_UNISTD_H
|
|
- ifeq ($(BUILD),debug)
|
|
- CFLAGS += -g
|
|
--else
|
|
-- CFLAGS += -O3
|
|
- endif
|
|
- ifeq (solaris,$(OS))
|
|
- CFLAGS+=-D_REENTRANT # for thread-safe errno
|
|
-@@ -342,7 +340,7 @@ $(IMPDIR)/%.d : src/%.d
|
|
- ######################## Build DMD if non-existent ##############################
|
|
-
|
|
- $(DMD):
|
|
-- $(MAKE) -C $(DMD_DIR)/src -f posix.mak BUILD=$(BUILD) OS=$(OS) MODEL=$(MODEL)
|
|
-+ $(MAKE) -C $(DMD_DIR) -f posix.mak BUILD=$(BUILD) OS=$(OS) MODEL=$(MODEL)
|
|
-
|
|
- ################### C/ASM Targets ############################
|
|
-
|
|
-@@ -464,7 +462,6 @@ benchmark-compile-only: $(ROOT)/benchmark $(DMD)
|
|
- DMD=$(DMD) $< --repeat=0 --dflags="$(PHOBOS_DFLAGS) -de"
|
|
-
|
|
- #################### test for undesired white spaces ##########################
|
|
--MANIFEST = $(shell git ls-tree --name-only -r HEAD)
|
|
-
|
|
- CWS_MAKEFILES = $(filter mak/% %.mak %/Makefile,$(MANIFEST))
|
|
- NOT_MAKEFILES = $(filter-out $(CWS_MAKEFILES) src/rt/minit.obj test/%.exp,$(MANIFEST))
|
|
Index: patches/patch-druntime-2_098_0_src_core_sys_posix_sys_mman_d
|
|
===================================================================
|
|
RCS file: patches/patch-druntime-2_098_0_src_core_sys_posix_sys_mman_d
|
|
diff -N patches/patch-druntime-2_098_0_src_core_sys_posix_sys_mman_d
|
|
--- patches/patch-druntime-2_098_0_src_core_sys_posix_sys_mman_d 11 Mar 2022 19:28:54 -0000 1.2
|
|
+++ /dev/null 1 Jan 1970 00:00:00 -0000
|
|
@@ -1,13 +0,0 @@
|
|
-Fibers need mmap(2) MAP_STACK.
|
|
-
|
|
-Index: druntime-2.098.0/src/core/sys/posix/sys/mman.d
|
|
---- druntime-2.098.0/src/core/sys/posix/sys/mman.d.orig
|
|
-+++ druntime-2.098.0/src/core/sys/posix/sys/mman.d
|
|
-@@ -460,6 +460,7 @@ else version (OpenBSD)
|
|
- enum MAP_PRIVATE = 0x0002;
|
|
- enum MAP_FIXED = 0x0010;
|
|
- enum MAP_ANON = 0x1000;
|
|
-+ enum MAP_STACK = 0x4000;
|
|
-
|
|
- enum MAP_FAILED = cast(void*)-1;
|
|
-
|
|
Index: patches/patch-druntime-2_098_0_src_core_thread_fiber_d
|
|
===================================================================
|
|
RCS file: patches/patch-druntime-2_098_0_src_core_thread_fiber_d
|
|
diff -N patches/patch-druntime-2_098_0_src_core_thread_fiber_d
|
|
--- patches/patch-druntime-2_098_0_src_core_thread_fiber_d 11 Mar 2022 19:28:54 -0000 1.2
|
|
+++ /dev/null 1 Jan 1970 00:00:00 -0000
|
|
@@ -1,20 +0,0 @@
|
|
-Fibers need mmap(2) MAP_STACK.
|
|
-
|
|
-Index: druntime-2.098.0/src/core/thread/fiber.d
|
|
---- druntime-2.098.0/src/core/thread/fiber.d.orig
|
|
-+++ druntime-2.098.0/src/core/thread/fiber.d
|
|
-@@ -982,10 +982,13 @@ class Fiber (private)
|
|
- // Allocate more for the memory guard
|
|
- sz += guardPageSize;
|
|
-
|
|
-+ int mmap_flags = MAP_PRIVATE | MAP_ANON;
|
|
-+ version (OpenBSD)
|
|
-+ mmap_flags |= MAP_STACK;
|
|
- m_pmem = mmap( null,
|
|
- sz,
|
|
- PROT_READ | PROT_WRITE,
|
|
-- MAP_PRIVATE | MAP_ANON,
|
|
-+ mmap_flags,
|
|
- -1,
|
|
- 0 );
|
|
- if ( m_pmem == MAP_FAILED )
|
|
Index: patches/patch-druntime_posix_mak
|
|
===================================================================
|
|
RCS file: patches/patch-druntime_posix_mak
|
|
diff -N patches/patch-druntime_posix_mak
|
|
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
|
+++ patches/patch-druntime_posix_mak 12 Mar 2022 16:22:12 -0000
|
|
@@ -0,0 +1,33 @@
|
|
+Index: druntime/posix.mak
|
|
+--- druntime/posix.mak.orig
|
|
++++ druntime/posix.mak
|
|
+@@ -65,11 +65,9 @@ MAKEFILE = $(firstword $(MAKEFILE_LIST))
|
|
+ DDOCFLAGS=-conf= -c -w -o- -Isrc -Iimport -version=CoreDdoc
|
|
+
|
|
+ # Set CFLAGS
|
|
+-CFLAGS=$(MODEL_FLAG) -fPIC -DHAVE_UNISTD_H
|
|
++CFLAGS+=$(MODEL_FLAG) -fPIC -DHAVE_UNISTD_H
|
|
+ ifeq ($(BUILD),debug)
|
|
+ CFLAGS += -g
|
|
+-else
|
|
+- CFLAGS += -O3
|
|
+ endif
|
|
+ ifeq (solaris,$(OS))
|
|
+ CFLAGS+=-D_REENTRANT # for thread-safe errno
|
|
+@@ -350,7 +348,7 @@ $(IMPDIR)/%.h : src/%.h
|
|
+ ######################## Build DMD if non-existent ##############################
|
|
+
|
|
+ $(DMD):
|
|
+- $(MAKE) -C $(DMD_DIR)/src -f posix.mak BUILD=$(BUILD) OS=$(OS) MODEL=$(MODEL)
|
|
++ $(MAKE) -C $(DMD_DIR) -f posix.mak BUILD=$(BUILD) OS=$(OS) MODEL=$(MODEL)
|
|
+
|
|
+ ################### C/ASM Targets ############################
|
|
+
|
|
+@@ -469,7 +467,6 @@ benchmark-compile-only: $(ROOT)/benchmark $(DMD)
|
|
+ DMD=$(DMD) $< --repeat=0 --dflags="$(PHOBOS_DFLAGS) -de"
|
|
+
|
|
+ #################### test for undesired white spaces ##########################
|
|
+-MANIFEST = $(shell git ls-tree --name-only -r HEAD)
|
|
+
|
|
+ CWS_MAKEFILES = $(filter mak/% %.mak %/Makefile,$(MANIFEST))
|
|
+ NOT_MAKEFILES = $(filter-out $(CWS_MAKEFILES) src/rt/minit.obj test/%.exp,$(MANIFEST))
|
|
Index: patches/patch-phobos-2_098_0_posix_mak
|
|
===================================================================
|
|
RCS file: patches/patch-phobos-2_098_0_posix_mak
|
|
diff -N patches/patch-phobos-2_098_0_posix_mak
|
|
--- patches/patch-phobos-2_098_0_posix_mak 11 Mar 2022 19:28:54 -0000 1.2
|
|
+++ /dev/null 1 Jan 1970 00:00:00 -0000
|
|
@@ -1,35 +0,0 @@
|
|
-Index: phobos-2.098.0/posix.mak
|
|
---- phobos-2.098.0/posix.mak.orig
|
|
-+++ phobos-2.098.0/posix.mak
|
|
-@@ -32,7 +32,7 @@ QUIET:=@
|
|
-
|
|
- DEBUGGER=gdb
|
|
- GIT_HOME=https://github.com/dlang
|
|
--DMD_DIR=../dmd
|
|
-+DMD_DIR=../dmd-2.098.0
|
|
-
|
|
- include $(DMD_DIR)/src/osmodel.mak
|
|
-
|
|
-@@ -67,7 +67,7 @@ endif
|
|
-
|
|
- # Configurable stuff that's rarely edited
|
|
- INSTALL_DIR = ../install
|
|
--DRUNTIME_PATH = ../druntime
|
|
-+DRUNTIME_PATH = ../druntime-2.098.0
|
|
- DLANG_ORG_DIR = ../dlang.org
|
|
- ZIPFILE = phobos.zip
|
|
- ROOT_OF_THEM_ALL = generated
|
|
-@@ -107,12 +107,10 @@ endif
|
|
- OUTFILEFLAG = -o
|
|
- NODEFAULTLIB=-defaultlib= -debuglib=
|
|
- ifeq (,$(findstring win,$(OS)))
|
|
-- CFLAGS=$(MODEL_FLAG) -fPIC -DHAVE_UNISTD_H
|
|
-+ CFLAGS+=$(MODEL_FLAG) -fPIC -DHAVE_UNISTD_H
|
|
- NODEFAULTLIB += -L-lpthread -L-lm
|
|
- ifeq ($(BUILD),debug)
|
|
- CFLAGS += -g
|
|
-- else
|
|
-- CFLAGS += -O3
|
|
- endif
|
|
- else
|
|
- ifeq ($(OS),win32)
|
|
Index: patches/patch-phobos_posix_mak
|
|
===================================================================
|
|
RCS file: patches/patch-phobos_posix_mak
|
|
diff -N patches/patch-phobos_posix_mak
|
|
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
|
+++ patches/patch-phobos_posix_mak 12 Mar 2022 16:22:12 -0000
|
|
@@ -0,0 +1,17 @@
|
|
+Index: phobos/posix.mak
|
|
+--- phobos/posix.mak.orig
|
|
++++ phobos/posix.mak
|
|
+@@ -107,12 +107,10 @@ endif
|
|
+ OUTFILEFLAG = -o
|
|
+ NODEFAULTLIB=-defaultlib= -debuglib=
|
|
+ ifeq (,$(findstring win,$(OS)))
|
|
+- CFLAGS=$(MODEL_FLAG) -fPIC -DHAVE_UNISTD_H
|
|
++ CFLAGS+=$(MODEL_FLAG) -fPIC -DHAVE_UNISTD_H
|
|
+ NODEFAULTLIB += -L-lpthread -L-lm
|
|
+ ifeq ($(BUILD),debug)
|
|
+ CFLAGS += -g
|
|
+- else
|
|
+- CFLAGS += -O3
|
|
+ endif
|
|
+ else
|
|
+ ifeq ($(OS),win32)
|
|
Index: pkg/PLIST
|
|
===================================================================
|
|
RCS file: /cvs/ports/lang/dmd/pkg/PLIST,v
|
|
retrieving revision 1.2
|
|
diff -u -p -r1.2 PLIST
|
|
--- pkg/PLIST 11 Mar 2022 19:28:55 -0000 1.2
|
|
+++ pkg/PLIST 12 Mar 2022 16:22:12 -0000
|
|
@@ -2,6 +2,7 @@
|
|
include/dmd/
|
|
include/dmd/druntime/
|
|
include/dmd/druntime/import/
|
|
+include/dmd/druntime/import/__builtins.di
|
|
include/dmd/druntime/import/core/
|
|
include/dmd/druntime/import/core/atomic.d
|
|
include/dmd/druntime/import/core/attribute.d
|
|
@@ -268,6 +269,7 @@ include/dmd/druntime/import/core/sys/ope
|
|
include/dmd/druntime/import/core/sys/openbsd/dlfcn.d
|
|
include/dmd/druntime/import/core/sys/openbsd/err.d
|
|
include/dmd/druntime/import/core/sys/openbsd/execinfo.d
|
|
+include/dmd/druntime/import/core/sys/openbsd/pthread_np.d
|
|
include/dmd/druntime/import/core/sys/openbsd/stdlib.d
|
|
include/dmd/druntime/import/core/sys/openbsd/string.d
|
|
include/dmd/druntime/import/core/sys/openbsd/sys/
|
|
@@ -545,6 +547,7 @@ include/dmd/druntime/import/core/volatil
|
|
include/dmd/druntime/import/etc/
|
|
include/dmd/druntime/import/etc/linux/
|
|
include/dmd/druntime/import/etc/linux/memoryerror.d
|
|
+include/dmd/druntime/import/importc.h
|
|
include/dmd/druntime/import/object.d
|
|
include/dmd/phobos/
|
|
include/dmd/phobos/etc/
|
|
@@ -561,13 +564,13 @@ include/dmd/phobos/etc/c/zlib.d
|
|
include/dmd/phobos/etc/c/zlib/ChangeLog
|
|
include/dmd/phobos/etc/c/zlib/README
|
|
include/dmd/phobos/etc/c/zlib/adler32.c
|
|
-include/dmd/phobos/etc/c/zlib/algorithm.txt
|
|
include/dmd/phobos/etc/c/zlib/compress.c
|
|
include/dmd/phobos/etc/c/zlib/crc32.c
|
|
include/dmd/phobos/etc/c/zlib/crc32.h
|
|
include/dmd/phobos/etc/c/zlib/deflate.c
|
|
include/dmd/phobos/etc/c/zlib/deflate.h
|
|
-include/dmd/phobos/etc/c/zlib/example.c
|
|
+include/dmd/phobos/etc/c/zlib/doc/
|
|
+include/dmd/phobos/etc/c/zlib/doc/algorithm.txt
|
|
include/dmd/phobos/etc/c/zlib/gzclose.c
|
|
include/dmd/phobos/etc/c/zlib/gzguts.h
|
|
include/dmd/phobos/etc/c/zlib/gzlib.c
|
|
@@ -582,8 +585,11 @@ include/dmd/phobos/etc/c/zlib/inflate.h
|
|
include/dmd/phobos/etc/c/zlib/inftrees.c
|
|
include/dmd/phobos/etc/c/zlib/inftrees.h
|
|
include/dmd/phobos/etc/c/zlib/linux.mak
|
|
-include/dmd/phobos/etc/c/zlib/minigzip.c
|
|
include/dmd/phobos/etc/c/zlib/osx.mak
|
|
+include/dmd/phobos/etc/c/zlib/test/
|
|
+include/dmd/phobos/etc/c/zlib/test/example.c
|
|
+include/dmd/phobos/etc/c/zlib/test/infcover.c
|
|
+include/dmd/phobos/etc/c/zlib/test/minigzip.c
|
|
include/dmd/phobos/etc/c/zlib/trees.c
|
|
include/dmd/phobos/etc/c/zlib/trees.h
|
|
include/dmd/phobos/etc/c/zlib/uncompr.c
|
|
@@ -609,6 +615,7 @@ include/dmd/phobos/std/ascii.d
|
|
include/dmd/phobos/std/base64.d
|
|
include/dmd/phobos/std/bigint.d
|
|
include/dmd/phobos/std/bitmanip.d
|
|
+include/dmd/phobos/std/checkedint.d
|
|
include/dmd/phobos/std/compiler.d
|
|
include/dmd/phobos/std/complex.d
|
|
include/dmd/phobos/std/concurrency.d
|