The actual fix as been done by "pkglint -F */*/buildlink3.mk", and was
reviewed manually.
There are some .include lines that still are indented with zero spaces
although the surrounding .if is indented. This is existing practice.
Unsorted entries in PLIST files have generated a pkglint warning for at
least 12 years. Somewhat more recently, pkglint has learned to sort
PLIST files automatically. Since pkglint 5.4.23, the sorting is only
done in obvious, simple cases. These have been applied by running:
pkglint -Cnone,PLIST -Wnone,plist-sort -r -F
to address issues with NetBSD-6(and earlier)'s fontconfig not being
new enough for pango.
While doing that, also bump freetype2 dependency to current pkgsrc
version.
Suggested by tron in PR 47882
---
otcl-1.14 Released Sat Oct 29 2011
(Major change is to update for tcl-8.5 changes, contributed from Amir
Habibi (habibi@uci.edu)) TCL 8.5.3 has several fundamental internal and
API changes that render OTCL's use of its low level data structures and
API syntactically and semnatically incompatible. The major changes are:
* Variables are kept in a new internal hashtable type named
VarInHash. Majority of hashtable API functions do not take this
into consideration and lead to segmentation faults. Unfortunately
majority of the potential API functions are defined as static in
original TCL code under generic/tclVar.c and we have to redefine
them in OTCL code.
CallFrame.varTablePtr doesn't any longer refer to a string based
hashtable. The new type is TclVarHashtable that encapsulates a
VarInHash type hashtable (table) along with a namespace
(nsPtr). It doesn't need to be initialized as TCL engin will
allocate it if a local variable is to be defined.
+ Commands are parsed into object-based and string-based
functions in Tcl_CmdInfo and clientData is not any longer
guaranteed to be iof (Proc *) type.
Changes made in otcl1-13 to make it compatible with TCL 8.5.3 and
hopefully later versions are as follows: (Referenced line numbers
are with regards to the new version)
+ 0059-0064: Modified to reflect the change in the CallFrame. it
also defines TCL_VERSION_8_5_OR_HIGHER to simplify changes.
+ 0069-0083: Define few Tcl_xxx macros to make the changes as
clean as possible. These macros are defined for pre and post
TCL 8.5.3
+ 0587-0597: AddMethod is supposed to keep a copy of a
Tcl_CmdInfo data structure after TCL engine has parsed the tcl
code. ocd input argument is addded to the prototype to deal
with object-based ClientData or the (Proc *) of the tcl
procedure. For internal Object and Class objects only
string-based information is needed by OTCL. Based on this
change, calls to AddMethod in the following lines are
modified: 1418-1423, 1845-1849, 1945, 1954
+ 0609-0612: Apparently TCL calls the delete function on the
Tcl_CmdInfo and we don't need to call it again otherwise glibc
panics b/c of double free call on the same pointer. (I didn't
dig into this one and my fix may cause a memory leak)
+ 0732-0737: ListKeys is used for dumping keys in all hashtables
and since the variables has is no longer a string hash, this
functions is slightly modified to reflect this change. Since
TCL doesn't make VarHash related functions available to
public, we can't automatically recognize a VarInHash type and
I resorted to adding a new input argument, isVarHash, to
explicitly pass the flag to this function. Based on this
change, calls to Listkeys in the following lines are modified:
1372, 1388, 1804
+ 0784: Modified to reflect object-based versus string-based
functions use of clientData and objClientData in Tcl_CmdInfo
respectively.
+ 0920: VarTablePtr doesn't need to be initialized in TCL 8.5.3
and the call to Tcl_InitHashTable for older versions is added
to Tcl_VarHashInitilize macro.
+ 0949-0952: Modified to initialize additional fields in
CallFrame.
+ 1004: Modified to cover the cases where varTablePtr remains
null during the lifetime of the object.
+ 1008-1015: Modified to reflect changes in varTablePtr
+ 1021-1035: This block of code is no longer needed as in TCL
8.5.3 hPtr is removed Var structure and instead VarInHash
encapsualtes Var and Tcl_HashEntry. (This may need further
investigation !!!)
+ 1036-137: Modified to cover the cases where varTablePtr
remains null during the lifetime of the object.
+ 1069-1071: Modified to use macros that deal with different
ways of initialization of varTablePtr in TCL 8.5.3 and older
versions.
+ 1208-1210: Modified to use macros that deal with different
ways of initialization of varTablePtr in TCL 8.5.3 and older
versions.
+ 1211: Modified to clarify the assignment. This is not related
to changes for TCL 8.5.3
Pass the tlc/tk versions to the configure script after including their
Makefile.version files. Unfortunately, while the build gets further,
it breaks later due to incompatiblity with version 8.5.
This changes the buildlink3.mk files to use an include guard for the
recursive include. The use of BUILDLINK_DEPTH, BUILDLINK_DEPENDS,
BUILDLINK_PACKAGES and BUILDLINK_ORDER is handled by a single new
variable BUILDLINK_TREE. Each buildlink3.mk file adds a pair of
enter/exit marker, which can be used to reconstruct the tree and
to determine first level includes. Avoiding := for large variables
(BUILDLINK_ORDER) speeds up parse time as += has linear complexity.
The include guard reduces system time by avoiding reading files over and
over again. For complex packages this reduces both %user and %sys time to
half of the former time.
and add a new helper target and script, "show-buildlink3", that outputs
a listing of the buildlink3.mk files included as well as the depth at
which they are included.
For example, "make show-buildlink3" in fonts/Xft2 displays:
zlib
fontconfig
iconv
zlib
freetype2
expat
freetype2
Xrender
renderproto
RECOMMENDED is removed. It becomes ABI_DEPENDS.
BUILDLINK_RECOMMENDED.foo becomes BUILDLINK_ABI_DEPENDS.foo.
BUILDLINK_DEPENDS.foo becomes BUILDLINK_API_DEPENDS.foo.
BUILDLINK_DEPENDS does not change.
IGNORE_RECOMMENDED (which defaulted to "no") becomes USE_ABI_DEPENDS
which defaults to "yes".
Added to obsolete.mk checking for IGNORE_RECOMMENDED.
I did not manually go through and fix any aesthetic tab/spacing issues.
I have tested the above patch on DragonFly building and packaging
subversion and pkglint and their many dependencies.
I have also tested USE_ABI_DEPENDS=no on my NetBSD workstation (where I
have used IGNORE_RECOMMENDED for a long time). I have been an active user
of IGNORE_RECOMMENDED since it was available.
As suggested, I removed the documentation sentences suggesting bumping for
"security" issues.
As discussed on tech-pkg.
I will commit to revbump, pkglint, pkg_install, createbuildlink separately.
Note that if you use wip, it will fail! I will commit to pkgsrc-wip
later (within day).
Several changes are involved since they are all interrelated. These
changes affect about 1000 files.
The first major change is rewriting bsd.builtin.mk as well as all of
the builtin.mk files to follow the new example in bsd.builtin.mk.
The loop to include all of the builtin.mk files needed by the package
is moved from bsd.builtin.mk and into bsd.buildlink3.mk. bsd.builtin.mk
is now included by each of the individual builtin.mk files and provides
some common logic for all of the builtin.mk files. Currently, this
includes the computation for whether the native or pkgsrc version of
the package is preferred. This causes USE_BUILTIN.* to be correctly
set when one builtin.mk file includes another.
The second major change is teach the builtin.mk files to consider
files under ${LOCALBASE} to be from pkgsrc-controlled packages. Most
of the builtin.mk files test for the presence of built-in software by
checking for the existence of certain files, e.g. <pthread.h>, and we
now assume that if that file is under ${LOCALBASE}, then it must be
from pkgsrc. This modification is a nod toward LOCALBASE=/usr. The
exceptions to this new check are the X11 distribution packages, which
are handled specially as noted below.
The third major change is providing builtin.mk and version.mk files
for each of the X11 distribution packages in pkgsrc. The builtin.mk
file can detect whether the native X11 distribution is the same as
the one provided by pkgsrc, and the version.mk file computes the
version of the X11 distribution package, whether it's built-in or not.
The fourth major change is that the buildlink3.mk files for X11 packages
that install parts which are part of X11 distribution packages, e.g.
Xpm, Xcursor, etc., now use imake to query the X11 distribution for
whether the software is already provided by the X11 distribution.
This is more accurate than grepping for a symbol name in the imake
config files. Using imake required sprinkling various builtin-imake.mk
helper files into pkgsrc directories. These files are used as input
to imake since imake can't use stdin for that purpose.
The fifth major change is in how packages note that they use X11.
Instead of setting USE_X11, package Makefiles should now include
x11.buildlink3.mk instead. This causes the X11 package buildlink3
and builtin logic to be executed at the correct place for buildlink3.mk
and builtin.mk files that previously set USE_X11, and fixes packages
that relied on buildlink3.mk files to implicitly note that X11 is
needed. Package buildlink3.mk should also include x11.buildlink3.mk
when linking against the package libraries requires also linking
against the X11 libraries. Where it was obvious, redundant inclusions
of x11.buildlink3.mk have been removed.
in the process. (More information on tech-pkg.)
Bump PKGREVISION and BUILDLINK_DEPENDS of all packages using libtool and
installing .la files.
Bump PKGREVISION (only) of all packages depending directly on the above
via a buildlink3 include.
All library names listed by *.la files no longer need to be listed
in the PLIST, e.g., instead of:
lib/libfoo.a
lib/libfoo.la
lib/libfoo.so
lib/libfoo.so.0
lib/libfoo.so.0.1
one simply needs:
lib/libfoo.la
and bsd.pkg.mk will automatically ensure that the additional library
names are listed in the installed package +CONTENTS file.
Also make LIBTOOLIZE_PLIST default to "yes".
by moving the inclusion of buildlink3.mk files outside of the protected
region. This bug would be seen by users that have set PREFER_PKGSRC
or PREFER_NATIVE to non-default values.
BUILDLINK_PACKAGES should be ordered so that for any package in the
list, that package doesn't depend on any packages to the left of it
in the list. This ordering property is used to check for builtin
packages in the correct order. The problem was that including a
buildlink3.mk file for <pkg> correctly ensured that <pkg> was removed
from BUILDLINK_PACKAGES and appended to the end. However, since the
inclusion of any other buildlink3.mk files within that buildlink3.mk
was in a region that was protected against multiple inclusion, those
dependencies weren't also moved to the end of BUILDLINK_PACKAGES.
Changes:
* Define macros CONST84 and CONST84_RETURN in otcl.h
* Change char* to CONST84 char* (or CONST84_RETRUN char * if it is a
function return) in otcl.c
* test hangs for lib/test.tcl (autoload), see comments in lib/test.tcl