emulators/i386-wine-devel: Style improvements
- Reorder variables. - Remove tools for updating pkg-plist: they were broken by precedent commits and based on the python 2 script files/mergeplist.py, but python 2 is now EOL. - Move port-update target from Makefile.amd64 to Makefile and rename it distinfo-update as it does not update pkg-plist anymore. - Remove EXTRACT_SUFX and use properly USES=tar:txz instead. - Remove references to removed wine staging ports in CONFLICTS_INSTALL. Approved by: tcberner (co-mentor) Differential Revision: https://reviews.freebsd.org/D24550
This commit is contained in:
parent
f1522ac876
commit
43ce40675e
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=533164
@ -18,4 +18,20 @@ COMMENT= 32-bit Microsoft Windows compatibility environment for 64-bit FreeBSD
|
||||
|
||||
ONLY_FOR_ARCHS= i386 amd64
|
||||
|
||||
CONFLICTS_INSTALL= wine-[0-9]* wine-devel-[0-9]* i386-wine-[0-9]*
|
||||
|
||||
PKGINSTALL= ${.CURDIR}/files/pkg-install
|
||||
PKGDEINSTALL= ${PKGINSTALL}
|
||||
|
||||
distinfo-update:
|
||||
${RM} ${.CURDIR}/distinfo ${.CURDIR}/distinfo~
|
||||
.for osrel in 11 12 13
|
||||
${MAKE} fetch OSREL=${osrel} OSVERSION=${osrel}99999 _OSRELEASE=${osrel}
|
||||
${MAKE} makesum OSREL=${osrel} OSVERSION=${osrel}99999 _OSRELEASE=${osrel}
|
||||
${CAT} ${.CURDIR}/distinfo >> ${.CURDIR}/distinfo~
|
||||
${RM} ${.CURDIR}/distinfo
|
||||
.endfor
|
||||
${SED} -e '2,$${' -e '/^TIMESTAMP/d' -e '}' distinfo~ > ${.CURDIR}/distinfo
|
||||
${RM} ${.CURDIR}/distinfo~
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -5,36 +5,22 @@ DISTVERSION= 5.5
|
||||
PORTEPOCH= 1
|
||||
MASTER_SITES= LOCAL/salvadore/i386-wine-devel/${DIST_SUBDIR}/
|
||||
DISTNAME= ${PKGNAME}
|
||||
EXTRACT_SUFX= .txz
|
||||
DIST_SUBDIR= FreeBSD:${OSREL:C/\..*//}:amd64
|
||||
|
||||
LICENSE= LGPL21 LGPL3
|
||||
LICENSE_COMB= dual
|
||||
LICENSE_FILE= ${WRKDIR}/LICENSE
|
||||
|
||||
OPTIONS_DEFINE= GECKO MONO
|
||||
GECKO_DESC= Bundle Gecko MSI package for Wine
|
||||
MONO_DESC= Bundle Mono MSI package for Wine
|
||||
|
||||
CONFLICTS_INSTALL?= wine-[0-9]* wine-staging-[0-9]* wine-devel-[0-9]* \
|
||||
i386-wine-[0-9]* i386-wine-staging-[0-9]*
|
||||
|
||||
EXTRACT_AFTER_ARGS= -C / --exclude +COMPACT_MANIFEST --exclude +MANIFEST \
|
||||
--exclude +MTREE_DIRS --exclude share/licenses/'*' \
|
||||
--exclude libdata/ldconfig32/${PKGNAMEPREFIX}${PORTNAME} \
|
||||
-s '|/usr/local|${STAGEDIR}${PREFIX}|gs'
|
||||
NO_BUILD= yes
|
||||
SLAVEDIR?= ${.CURDIR}
|
||||
PKGINSTALL= ${SLAVEDIR}/files/pkg-install
|
||||
PKGDEINSTALL= ${PKGINSTALL}
|
||||
PKGMESSAGE= ${WRKDIR}/pkg-message
|
||||
SUB_FILES= pkg-message
|
||||
USE_LDCONFIG32= ${PREFIX}/lib32 ${PREFIX}/lib32/wine
|
||||
USES= tar:xz desktop-file-utils
|
||||
USES= tar:txz desktop-file-utils
|
||||
BUNDLE_LIBS= yes
|
||||
|
||||
GECKO_RUN_DEPENDS= ${DATADIR}/gecko/wine-gecko-2.47.1-x86.msi:emulators/wine-gecko-devel
|
||||
MONO_RUN_DEPENDS= ${DATADIR}/mono/wine-mono-4.9.4.msi:emulators/wine-mono-devel
|
||||
PKGMESSAGE= ${WRKDIR}/pkg-message
|
||||
|
||||
.for osrel in 11 12 13
|
||||
.if ${OSREL:C/\..*//} == ${osrel}
|
||||
@ -56,9 +42,15 @@ PLIST_SUB+= NOOSREL${osrel}=""
|
||||
|
||||
.if ${OPSYS} != FreeBSD || (!(${OSVERSION} >= 1103000 && ${OSVERSION} < 1200000) && !(${OSVERSION} >= 1201000 && ${OSVERSION} < 1300000) && !(${OSVERSION} >= 1300084 && ${OSVERSION} < 1400000))
|
||||
IGNORE= binaries compiled for FreeBSD 11.3+, 12.1+ and 13.0-CURRENT (OSVERSION >= 1300084) only
|
||||
DISTFILES=
|
||||
.endif
|
||||
|
||||
OPTIONS_DEFINE= GECKO MONO
|
||||
GECKO_DESC= Bundle Gecko MSI package for Wine
|
||||
MONO_DESC= Bundle Mono MSI package for Wine
|
||||
|
||||
GECKO_RUN_DEPENDS= ${DATADIR}/gecko/wine-gecko-2.47.1-x86.msi:emulators/wine-gecko-devel
|
||||
MONO_RUN_DEPENDS= ${DATADIR}/mono/wine-mono-4.9.4.msi:emulators/wine-mono-devel
|
||||
|
||||
do-extract:
|
||||
@${RM} -r ${WRKDIR}
|
||||
@${MKDIR} ${WRKDIR}
|
||||
@ -66,20 +58,3 @@ do-extract:
|
||||
|
||||
do-install:
|
||||
${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/${EXTRACT_ONLY} ${EXTRACT_AFTER_ARGS}
|
||||
|
||||
${PLIST}: checksum
|
||||
${TAR} -tf ${_DISTDIR}/${EXTRACT_ONLY} ${EXTRACT_AFTER_ARGS} > /dev/null
|
||||
${TAR} -tf ${_DISTDIR}/${EXTRACT_ONLY} ${EXTRACT_AFTER_ARGS} | ${GREP} -v '/$$\|ldconfig32' | ${SED} 's|/usr/local/||g' | sort > ${PLIST}
|
||||
|
||||
port-update:
|
||||
${RM} ${SLAVEDIR}/distinfo ${SLAVEDIR}/distinfo~ ${SLAVEDIR}/pkg-plist.*
|
||||
.for osrel in 11 12 13
|
||||
${MAKE} fetch OSREL=${osrel} OSVERSION=${osrel}99999 _OSRELEASE=${osrel}
|
||||
${MAKE} makesum OSREL=${osrel} OSVERSION=${osrel}99999 _OSRELEASE=${osrel}
|
||||
${CAT} ${SLAVEDIR}/distinfo >> ${SLAVEDIR}/distinfo~
|
||||
${RM} ${SLAVEDIR}/distinfo
|
||||
${MAKE} pkg-plist.${osrel}${suffix:tu} PLIST=pkg-plist.${osrel}${suffix:tu} OSREL=${osrel} OSVERSION=${osrel}99999 _OSRELEASE=${osrel}
|
||||
.endfor
|
||||
${SED} -e '2,$${' -e '/^TIMESTAMP/d' -e '}' distinfo~ > ${SLAVEDIR}/distinfo
|
||||
python ${FILESDIR}/mergeplist.py ${SLAVEDIR}/pkg-plist.* > ${PLIST}
|
||||
${RM} ${SLAVEDIR}/distinfo~ ${SLAVEDIR}/pkg-plist.*
|
||||
|
@ -2,16 +2,10 @@
|
||||
# $FreeBSD$
|
||||
|
||||
# Use the wine port to do most of the heavy lifting
|
||||
SLAVEDIR?= ${.CURDIR}
|
||||
MASTERDIR= ${SLAVEDIR}/../wine-devel
|
||||
PKGINSTALL= ${SLAVEDIR}/files/pkg-install
|
||||
PKGDEINSTALL= ${PKGINSTALL}
|
||||
MASTERDIR= ${.CURDIR}/../wine-devel
|
||||
|
||||
RUN_DEPENDS= mesa-dri>0:graphics/mesa-dri
|
||||
|
||||
CONFLICTS_INSTALL?= wine-[0-9]* wine-staging-[0-9]* wine-devel-[0-9]* \
|
||||
i386-wine-[0-9]* i386-wine-staging-[0-9]*
|
||||
|
||||
ACTUAL-PACKAGE-DEPENDS= ${DO_NADA}
|
||||
WINELIBDIR= ${PREFIX}/lib32
|
||||
CONFIGURE_ARGS+= --bindir=${PREFIX}/bin32 --libdir=${WINELIBDIR}
|
||||
@ -31,7 +25,7 @@ post-install-script:
|
||||
# Fix pkg-plist references
|
||||
${REINPLACE_CMD} -e 's!lib/!lib32/!g' ${TMPPLIST}
|
||||
# Install bounce script to access the 32-bit executables
|
||||
${INSTALL_SCRIPT} ${SLAVEDIR}/files/binbounce ${STAGEDIR}${PREFIX}/bin/wine
|
||||
${INSTALL_SCRIPT} ${.CURDIR}/files/binbounce ${STAGEDIR}${PREFIX}/bin/wine
|
||||
for i in `${GREP} ^bin ${TMPPLIST} | ${XARGS} -n1 basename` ; do \
|
||||
[ "$${i}" = "wine" ] || ${LN} -f ${STAGEDIR}${PREFIX}/bin/wine ${STAGEDIR}${PREFIX}/bin/$${i} ; \
|
||||
${ECHO_CMD} bin32/$${i} >> ${TMPPLIST} ; \
|
||||
@ -68,7 +62,7 @@ post-install-script:
|
||||
fi ; \
|
||||
done
|
||||
# Install nvidia patching script
|
||||
${INSTALL_SCRIPT} ${SLAVEDIR}/files/nvidia.sh ${STAGEDIR}${DATADIR}/patch-nvidia.sh
|
||||
${INSTALL_SCRIPT} ${.CURDIR}/files/nvidia.sh ${STAGEDIR}${DATADIR}/patch-nvidia.sh
|
||||
${ECHO_CMD} ${DATADIR:S|$(PREFIX)/||}/patch-nvidia.sh >> ${TMPPLIST}
|
||||
|
||||
.include "${MASTERDIR}/Makefile"
|
||||
|
@ -1,133 +0,0 @@
|
||||
#!/usr/bin/env python2
|
||||
|
||||
import sys
|
||||
|
||||
# <recipe url="http://code.activestate.com/recipes/576694/" license="MIT">
|
||||
# added peek() method
|
||||
import collections
|
||||
|
||||
class OrderedSet(collections.MutableSet):
|
||||
|
||||
def __init__(self, iterable=None):
|
||||
self.end = end = []
|
||||
end += [None, end, end] # sentinel node for doubly linked list
|
||||
self.map = {} # key --> [key, prev, next]
|
||||
if iterable is not None:
|
||||
self |= iterable
|
||||
|
||||
def __len__(self):
|
||||
return len(self.map)
|
||||
|
||||
def __contains__(self, key):
|
||||
return key in self.map
|
||||
|
||||
def add(self, key):
|
||||
if key not in self.map:
|
||||
end = self.end
|
||||
curr = end[1]
|
||||
curr[2] = end[1] = self.map[key] = [key, curr, end]
|
||||
|
||||
def discard(self, key):
|
||||
if key in self.map:
|
||||
key, prev, next = self.map.pop(key)
|
||||
prev[2] = next
|
||||
next[1] = prev
|
||||
|
||||
def peek(self, last=False):
|
||||
end = self.end
|
||||
curr = end[1] if last else end[2]
|
||||
if curr is not end:
|
||||
return curr[0]
|
||||
raise IndexError("OrderedSet is empty, cannot peek item")
|
||||
|
||||
def __iter__(self):
|
||||
end = self.end
|
||||
curr = end[2]
|
||||
while curr is not end:
|
||||
yield curr[0]
|
||||
curr = curr[2]
|
||||
|
||||
def __reversed__(self):
|
||||
end = self.end
|
||||
curr = end[1]
|
||||
while curr is not end:
|
||||
yield curr[0]
|
||||
curr = curr[1]
|
||||
|
||||
def pop(self, last=False):
|
||||
if not self:
|
||||
raise KeyError('set is empty')
|
||||
key = self.end[1][0] if last else self.end[2][0]
|
||||
self.discard(key)
|
||||
return key
|
||||
|
||||
def __repr__(self):
|
||||
if not self:
|
||||
return '%s()' % (self.__class__.__name__,)
|
||||
return '%s(%r)' % (self.__class__.__name__, list(self))
|
||||
|
||||
def __eq__(self, other):
|
||||
if isinstance(other, OrderedSet):
|
||||
return len(self) == len(other) and list(self) == list(other)
|
||||
return set(self) == set(other)
|
||||
#</recipe>
|
||||
|
||||
def main(plists):
|
||||
prev = prev_short = None
|
||||
for line in gen_list(plists):
|
||||
if line.startswith("%%"):
|
||||
line_short = line.split("%%", 3)[1:]
|
||||
line_short = "%%%%%s%%%%%s" % (line_short[0].split("-", 2)[0], line_short[1])
|
||||
if prev_short == line_short:
|
||||
print(line_short)
|
||||
line = line_short = None
|
||||
elif prev is not None:
|
||||
print(prev)
|
||||
prev, prev_short = line, line_short
|
||||
else:
|
||||
if prev is not None:
|
||||
print(prev)
|
||||
prev = prev_short = None
|
||||
print line
|
||||
if prev is not None:
|
||||
print(prev)
|
||||
|
||||
def gen_list(plists):
|
||||
plists_len = len(plists)
|
||||
plists.sort(key=lambda x: int(x.rsplit('.', 2)[-1].split('-', 2)[0]))
|
||||
names = ["OSREL" + plist.rsplit('.', 2)[-1] for plist in plists]
|
||||
for i in range(plists_len):
|
||||
with open(plists[i], 'r') as file:
|
||||
plists[i] = OrderedSet(line.strip() for line in file.readlines())
|
||||
empty = sum(len(plist) == 0 for plist in plists)
|
||||
while empty < plists_len:
|
||||
# Test if the top of the plists are all common
|
||||
if not empty:
|
||||
line = plists[0].peek()
|
||||
if not empty and all(line == plist.peek() for plist in plists):
|
||||
yield line
|
||||
for plist in plists:
|
||||
plist.pop()
|
||||
else:
|
||||
# Find which of the plists have non-common lines
|
||||
lines = {}
|
||||
for i in range(plists_len):
|
||||
while len(plists[i]) and not all(plists[i].peek() in plist for plist in plists):
|
||||
lines.setdefault(plists[i].pop(), []).append(names[i])
|
||||
for line in sorted(lines.keys()):
|
||||
suffix = lines[line][0].split('-', 2)
|
||||
suffix = len(suffix) == 2 and suffix[-1]
|
||||
single_suffix = False
|
||||
if suffix:
|
||||
plists_suffix_len = sum(1 for name in names if name.endswith(suffix))
|
||||
single_suffix = plists_suffix_len == sum(1 for _ in lines[line]) and \
|
||||
all(name.split('-', 2)[-1] == suffix for name in lines[line])
|
||||
if single_suffix:
|
||||
yield "%%" + suffix + "%%" + line
|
||||
else:
|
||||
for name in lines[line]:
|
||||
yield "%%" + name + "%%" + line
|
||||
empty = sum(len(plist) == 0 for plist in plists)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main(sys.argv[1:])
|
Loading…
Reference in New Issue
Block a user