Migrate pugixml to subproject

This commit is contained in:
Pau RE authored and pancake committed 2025-09-17 17:56:54 +02:00
1 parent 2e02815fb3
commit 24dfc208f5
11 files changed
+50 -27

No files matched your search

+1
View File
@@ -17,4 +17,5 @@ ghidra-processors.txt
ghidra/sleighc
subprojects/ghidra-native
subprojects/pugixml
subprojects/zlib
-3
View File
@@ -1,3 +0,0 @@
[submodule "third-party/pugixml"]
path = third-party/pugixml
url = https://github.com/zeux/pugixml.git
+2 -8
View File
@@ -3,9 +3,7 @@ DESTDIR?=
GHIDRA_NATIVE_COMMIT=0.5.0
PUGIXML=third-party/pugixml/Makefile
all: ghidra-processors.txt $(PUGIXML)
all: ghidra-processors.txt
$(MAKE) -C src
$(MAKE) -C ghidra
@@ -44,11 +42,7 @@ install uninstall user-install user-uninstall:
$(MAKE) -C src $@
$(MAKE) -C ghidra $@
$(PUGIXML):
git submodule update --init
mrproper: clean
git submodule deinit --all -f
mrproper: clean
r2ghidra_sleigh.zip dist:
rm -rf tmp && mkdir -p tmp
+1 -1
View File
@@ -9,7 +9,7 @@ rm -rf r2ghidra-${V}
git clone ../.. r2ghidra-${V} || exit 1
cd r2ghidra-${V} || exit 1
./preconfigure || exit 1
rm -rf .git ghidra-native/.git third-party/pugixml/.git
rm -rf .git subprojects/ghidra-native/.git subprojects/pugixml/.git
cd ..
rm -f r2ghidra-${V}.tar.xz
tar cJvf r2ghidra-${V}.tar.xz r2ghidra-${V}
+2 -12
View File
@@ -7,11 +7,6 @@ version : '6.0.0',
default_options : ['c_std=c11', 'cpp_std=c++14']
)
pugixml_sources = [
'third-party/pugixml/src/pugixml.cpp'
]
r2ghidra_sources = [
'src/R2Architecture.cpp',
'src/R2LoadImage.cpp',
@@ -30,8 +25,6 @@ r2ghidra_sources = [
incdirs = [
'src',
'third-party/pugixml/src/',
# 'ghidra-native/src/decompiler/',
]
res = run_command(['radare2','-HR2_LIBR_PLUGINS'], capture:true, check:false)
@@ -99,12 +92,10 @@ ghidra_incs = ghidra.get_variable('incs')
libdecomp_static = ghidra.get_variable('libdecomp_static')
slgh_static = ghidra.get_variable('slgh_static')
# r2ghidra_incdirs += ghidra_incs
pugixml = subproject('pugixml').get_variable('pugixml_dep')
r2ghidra_core_sources = [
r2ghidra_sources,
pugixml_sources,
# ghidra_decompiler_sources,
'src/anal_ghidra_plugin.c',
'src/anal_ghidra.cpp',
@@ -114,7 +105,6 @@ r2ghidra_core_sources = [
sleighc_sources = [
r2ghidra_sources,
pugixml_sources,
# ghidra_slgh_sources,
# ghidra_decompiler_sources,
]
@@ -122,7 +112,7 @@ sleighc_sources = [
r2ghidra_core_plugin = shared_library('core_r2ghidra',
r2ghidra_core_sources,
link_with: libdecomp_static,
dependencies: [r_core, zlib],
dependencies: [r_core, zlib, pugixml],
override_options : ['c_std=c11', 'cpp_std=c++14'],
include_directories: [ghidra_incs, r2ghidra_incdirs],
install: true,
+1 -1
View File
@@ -25,7 +25,7 @@ R2GHIDRA_SRCS+=SleighInstruction.cpp
R2G_PLUG_SRCS= anal_ghidra.cpp core_ghidra.cpp
R2G_PLUG_SRCS+= anal_ghidra_plugin.o core_ghidra_plugin.o
PUGIXML_HOME=../third-party/pugixml/src/
PUGIXML_HOME=../subprojects/pugixml/src/
PUGIXML_CFLAGS=-I$(PUGIXML_HOME)
PUGIXML_SRCS= $(PUGIXML_HOME)/pugixml.cpp
PUGIXML_OBJS= $(PUGIXML_HOME)/pugixml.o
+2 -1
View File
@@ -1,4 +1,4 @@
DEPS=ghidra-native
DEPS=ghidra-native pugixml
ifeq ($(NEED_ZLIB),1)
DEPS += zlib
@@ -13,3 +13,4 @@ include ghidra-native.mk
ifeq ($(NEED_ZLIB),1)
include zlib.mk
endif
include pugixml.mk
@@ -0,0 +1,14 @@
project('pugixml', 'cpp', meson_version : '>=0.60.0', version : '0e3f1699ffab5f820060fe99c61f0f9495c0c5b6')
pugixml_sources = [
'src/pugixml.cpp',
]
incdirs = [
'src',
]
pugixml_dep = declare_dependency(
sources: pugixml_sources,
include_directories: include_directories(incdirs),
)
+21
View File
@@ -0,0 +1,21 @@
# This file is autogenerated by acr-wrap
WRAP_wrap_git_url:=https://github.com/zeux/pugixml.git
WRAP_wrap_git_revision:=v1.11.3
WRAP_wrap_git_directory:=pugixml
WRAP_wrap_git_patch_directory:=pugixml
WRAP_wrap_git_depth:=1
.PHONY: pugixml_clean pugixml_all
pugixml:
if [ ! -d "pugixml" -o "v1.11.3" != "$(shell cd pugixml 2>/dev/null && git rev-parse HEAD)" ]; then rm -rf "pugixml"; ${MAKE} pugixml_all; fi
pugixml_all:
git clone --no-checkout --depth=1 https://github.com/zeux/pugixml.git pugixml
cd pugixml && git fetch --depth=1 origin v1.11.3
cd pugixml && git checkout FETCH_HEAD
cp -rf packagefiles/pugixml/* pugixml
pugixml_clean:
rm -rf pugixml
+6
View File
@@ -0,0 +1,6 @@
[wrap-git]
url = https://github.com/zeux/pugixml.git
revision = v1.11.3
directory = pugixml
patch_directory = pugixml
depth = 1
Submodule third-party/pugixml deleted from 0e3f1699ff.