1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-28 05:29:48 +00:00

devel/plasma: Update to latest snapshot and undeprecate

Upstream has no yet adapted the code to use PyQt5 instead PyQt4. Thus the
option MEMMAP that requires Qt4 has been completely removed to make the
removal of Qt4 in the ports tree somewhat easier.

While I'm here:
* Fix license
* Simply GitHub usage by removing GH_PROJECT
* Add a patch to fix an issue with fake headers (not merged into upstream's
  repository, yet)

Approved by:	miwi (mentor)
Differential Revision:	https://reviews.freebsd.org/D19395
This commit is contained in:
Kai Knoblich 2019-02-28 14:54:36 +00:00
parent 327204ef66
commit 00d828bd7b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=494154
3 changed files with 75 additions and 21 deletions

View File

@ -1,14 +1,13 @@
# $FreeBSD$
PORTNAME= plasma
DISTVERSION= g20171121
PORTREVISION= 1
DISTVERSION= g20180708
CATEGORIES= devel python
MAINTAINER= kai@FreeBSD.org
COMMENT= Interactive disassembler for x86/ARM/MIPS
LICENSE= GPLv3
LICENSE= GPLv3+
LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= bash:shells/bash \
@ -27,26 +26,12 @@ USES= python:3.4+ shebangfix
USE_GITHUB= yes
GH_ACCOUNT= plasma-disassembler
GH_PROJECT= plasma
GH_TAGNAME= 8ec3bb7
GH_TAGNAME= 5bb07b3
USE_PYTHON= distutils noflavors autoplist
SHEBANG_FILES= tests/analyzer/run.sh
SHEBANG_GLOB= *.py
OPTIONS_DEFINE= MEMMAP
OPTIONS_DEFAULT= MEMMAP
MEMMAP_DESC= View memory maps (pulls in QT4)
MEMMAP_USES= pyqt:4
MEMMAP_USE= PYQT=gui_run
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MMEMMAP}
DEPRECATED= Qt4 has been EOL since december 2015
EXPIRATION_DATE= 2019-03-15
.endif
post-patch:
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/setup.py
@${REINPLACE_CMD} -e 's|python3|${PYTHON_CMD}|g' ${WRKSRC}/Makefile

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1517675748
SHA256 (plasma-disassembler-plasma-g20171121-8ec3bb7_GH0.tar.gz) = 5ae00ef3fa3326000968323bd6843fa293938a1024b2fcb6176b624c99e8c050
SIZE (plasma-disassembler-plasma-g20171121-8ec3bb7_GH0.tar.gz) = 352158
TIMESTAMP = 1551048444
SHA256 (plasma-disassembler-plasma-g20180708-5bb07b3_GH0.tar.gz) = 586b577dc3c428b7e45d76039921b56c3a60743f977756374614081f2730f0f4
SIZE (plasma-disassembler-plasma-g20180708-5bb07b3_GH0.tar.gz) = 352170

View File

@ -0,0 +1,69 @@
--- plasma/lib/fileformat/elf.py.orig 2019-02-27 16:23:45 UTC
+++ plasma/lib/fileformat/elf.py
@@ -215,9 +215,13 @@ class ELF(Binary):
# pyreadelf's assumptions make our own string table
fakestrtabheader = {
"sh_offset": self.__get_offset(self.dtags["DT_STRTAB"]),
+ "sh_size":0,
+ "sh_flags":0,
+ "sh_addralign":0
}
+
strtab = StringTableSection(
- fakestrtabheader, "strtab_plasma", self.elf.stream)
+ fakestrtabheader, "strtab_plasma", self.elf)
# ...
# Here in CLE was checked the DT_SONAME
@@ -232,7 +236,9 @@ class ELF(Binary):
fakesymtabheader = {
"sh_offset": self.__get_offset(self.dtags["DT_SYMTAB"]),
"sh_entsize": self.dtags["DT_SYMENT"],
- "sh_size": 0
+ "sh_size": 0,
+ "sh_flags": 0,
+ "sh_addralign" : 0
} # bogus size: no iteration allowed
# ...
@@ -240,7 +246,7 @@ class ELF(Binary):
# ...
self.dynsym = SymbolTableSection(
- fakesymtabheader, "symtab_plasma", self.elf.stream,
+ fakesymtabheader, "symtab_plasma",
self.elf, strtab)
# mips' relocations are absolutely screwed up, handle some of them here.
@@ -276,11 +282,12 @@ class ELF(Binary):
"sh_offset": self.__get_offset(reloffset),
"sh_type": "SHT_" + rela_type,
"sh_entsize": relentsz,
- "sh_size": relsz
+ "sh_size": relsz,
+ "sh_flags":0,
+ "sh_addralign":0
}
reloc_sec = RelocationSection(
- fakerelheader, "reloc_plasma",
- self.elf.stream, self.elf)
+ fakerelheader, "reloc_plasma", self.elf)
self.__register_relocs(reloc_sec)
# try to parse relocations out of a table of type DT_JMPREL
@@ -291,11 +298,13 @@ class ELF(Binary):
"sh_offset": self.__get_offset(jmpreloffset),
"sh_type": "SHT_" + rela_type,
"sh_entsize": relentsz,
- "sh_size": jmprelsz
+ "sh_size": jmprelsz,
+ "sh_flags":0,
+ "sh_addralign":0
}
jmprel_sec = RelocationSection(
fakejmprelheader, "jmprel_plasma",
- self.elf.stream, self.elf)
+ self.elf)
self.jmprel = self.__register_relocs(jmprel_sec)