diff --git a/dev-util/r2ghidra/patches/r2ghidra-5.9.4-source2.patchset b/dev-util/r2ghidra/patches/r2ghidra-6.0.2-source2.patchset similarity index 50% rename from dev-util/r2ghidra/patches/r2ghidra-5.9.4-source2.patchset rename to dev-util/r2ghidra/patches/r2ghidra-6.0.2-source2.patchset index f67e33ae3..accf50ab6 100644 --- a/dev-util/r2ghidra/patches/r2ghidra-5.9.4-source2.patchset +++ b/dev-util/r2ghidra/patches/r2ghidra-6.0.2-source2.patchset @@ -5,27 +5,25 @@ Subject: Build fix diff --git a/src/decompiler/filemanage.cc b/src/decompiler/filemanage.cc -index aa1d06c..e4a55b9 100644 +index 9e03ab2..5a9bdb9 100644 --- a/src/decompiler/filemanage.cc +++ b/src/decompiler/filemanage.cc -@@ -239,13 +239,17 @@ void FileManage::directoryList(vector &res,const string &dirname,bool al - if (dir == (DIR *)0) return; +@@ -258,6 +258,7 @@ void FileManage::directoryList(vector &res,const string &dirname,bool al entry = readdir(dir); while(entry != (struct dirent *)0) { + bool isDirectory = false; +#ifndef __HAIKU__ - if (entry->d_type == DT_DIR) { -+#endif - string fullname(entry->d_name); - if ((fullname!=".")&&(fullname!="..")) { - if (allowdot || (fullname[0] != '.')) - res.push_back( dirfinal + fullname ); - } -+#ifndef __HAIKU__ + if (entry->d_type == DT_DIR) + isDirectory = true; + else if (entry->d_type == DT_UNKNOWN || entry->d_type == DT_LNK) { +@@ -266,6 +267,7 @@ void FileManage::directoryList(vector &res,const string &dirname,bool al + stat(path.c_str(), &stbuf); + isDirectory = S_ISDIR(stbuf.st_mode); } +#endif - entry = readdir(dir); - } - closedir(dir); + if (isDirectory) { + string fullname(entry->d_name); + if ((fullname!=".")&&(fullname!="..")) { -- 2.45.2 diff --git a/dev-util/r2ghidra/r2ghidra-5.9.4.recipe b/dev-util/r2ghidra/r2ghidra-6.0.2.recipe similarity index 63% rename from dev-util/r2ghidra/r2ghidra-5.9.4.recipe rename to dev-util/r2ghidra/r2ghidra-6.0.2.recipe index 579584956..08990f971 100644 --- a/dev-util/r2ghidra/r2ghidra-5.9.4.recipe +++ b/dev-util/r2ghidra/r2ghidra-6.0.2.recipe @@ -17,19 +17,19 @@ LICENSE="Apache v2 GNU LGPL v3" REVISION="1" SOURCE_URI="https://github.com/radareorg/r2ghidra/archive/refs/tags/$portVersion.tar.gz" -CHECKSUM_SHA256="e2b04a336bf41d40b6dadd81c6015bdd3e8382d29a38d8f9791c77d2a63be6eb" +CHECKSUM_SHA256="cfb39f1c60ef6ad53742af7e3dca59f8e030752d57cb60b3e3f76540e0f1f7d9" SOURCE_FILENAME="r2ghidra-$portVersion.tar.gz" srcGitRev_2="21b6dbafee5b8265ee000827dd31f542ad46861d" -SOURCE_URI_2="https://github.com/radareorg/ghidra-native/archive/$srcGitRev_2.tar.gz" -CHECKSUM_SHA256_2="00b49c583d678f6847842693d26eff09259241b2bc3f9a202c14aeee57ba78d9" -SOURCE_FILENAME_2="ghidra-native-$srcGitRev_2.tar.gz" -SOURCE_DIR_2="ghidra-native-$srcGitRev_2" -PATCHES_2="r2ghidra-5.9.4-source2.patchset" +SOURCE_URI_2="https://github.com/radareorg/ghidra-native/archive/refs/tags/0.6.2.tar.gz" +CHECKSUM_SHA256_2="5e0619e7682b690ee33ab65cd89c4b9051312fbebb8216fd960c894dd2a63cfe" +SOURCE_FILENAME_2="ghidra-native-0.6.2.tar.gz" +SOURCE_DIR_2="ghidra-native-0.6.2" +PATCHES_2="r2ghidra-$portVersion-source2.patchset" srcGitRev_3="0e3f1699ffab5f820060fe99c61f0f9495c0c5b6" -SOURCE_URI_3="https://github.com/zeux/pugixml/archive/$srcGitRev_3.tar.gz" -CHECKSUM_SHA256_3="24ebdbf69a71838d4071a327a2e19a23cc875c5f13c5e2377a95bb42e7475f9c" -SOURCE_FILENAME_3="pugixml-$srcGitRev_3.tar.gz" -SOURCE_DIR_3="pugixml-$srcGitRev_3" +SOURCE_URI_3="https://github.com/zeux/pugixml/archive/refs/tags/v1.15.tar.gz" +CHECKSUM_SHA256_3="b39647064d9e28297a34278bfb897092bf33b7c487906ddfc094c9e8868bddcb" +SOURCE_FILENAME_3="pugixml-v1.15.tar.gz" +SOURCE_DIR_3="pugixml-1.15" ARCHITECTURES="all !x86_gcc2" SECONDARY_ARCHITECTURES="?x86" @@ -41,19 +41,22 @@ if [ "$targetArchitecture" = x86_gcc2 ]; then commandSuffix= fi +radare2Ver="6.0.4" + PROVIDES=" r2ghidra$secondaryArchSuffix = $portVersion cmd:sleighc$commandSuffix = $portVersion " REQUIRES=" haiku$secondaryArchSuffix + lib:libz$secondaryArchSuffix " BUILD_REQUIRES=" haiku${secondaryArchSuffix}_devel - devel:libr_anal$secondaryArchSuffix >= 5.9.6 - devel:libr_asm$secondaryArchSuffix >= 5.9.6 - devel:libr_core$secondaryArchSuffix >= 5.9.6 + devel:libr_anal$secondaryArchSuffix == $radare2Ver + devel:libr_asm$secondaryArchSuffix == $radare2Ver + devel:libr_core$secondaryArchSuffix == $radare2Ver " BUILD_PREREQUIRES=" cmd:awk @@ -69,11 +72,11 @@ BUILD_PREREQUIRES=" BUILD() { - mkdir -p ghidra-native - cp -R $sourceDir2/* ghidra-native - cp -R $sourceDir3/* third-party/pugixml + mkdir -p subprojects/{ghidra-native,pugixml} + cp -R $sourceDir2/* subprojects/ghidra-native + cp -R $sourceDir3/* subprojects/pugixml - make -C ghidra-native patch + make -C subprojects/ghidra-native patch runConfigure --omit-dirs binDir ./configure \ --bindir=$commandBinDir @@ -82,7 +85,7 @@ BUILD() INSTALL() { - make install R2_LIBR_PLUGINS=$libDir/radare2/5.9.6 + make install R2_LIBR_PLUGINS=$libDir/radare2/$radare2Ver } TEST()