Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37501154
en ru br
ALT Linux repositórios
S:0.26.6-alt1

Group :: Development/Tools
RPM: kde5-okteta

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: okteta-alt-castxml-compat.patch
Download


diff --git a/kasten/controllers/view/structures/struct2osd.in b/kasten/controllers/view/structures/struct2osd.in
index 1e942b8..f7380a4 100755
--- a/kasten/controllers/view/structures/struct2osd.in
+++ b/kasten/controllers/view/structures/struct2osd.in
@@ -1,12 +1,18 @@
 #!/bin/sh
 
-if [ -z "`which gccxml 2> /dev/null`" ]; then
-	echo "You need gccxml to use this script.";
-	exit;
+USE_CASTXML=1
+
+if [ -z "`which castxml 2> /dev/null`" ]; then
+	USE_CASTXML=0
+
+	if [ -z "`which gccxml 2> /dev/null`" ]; then
+		echo "You need castxml or gccxml to use this script.";
+		exit;
+	fi
 fi;
 
 if [ -z "`which xsltproc 2> /dev/null`" ]; then
-	echo "You need xsltporc to use this script.";
+	echo "You need xsltproc to use this script.";
 	echo "You can find it in the libxslt package.";
 	exit;
 fi;
@@ -25,7 +31,12 @@ GCCXML_FILE="${OSD_FILE%.*}.gcc.xml";
 shift 2;
 STRUCTS="$@"
 
-gccxml "$INPUT_FILE" -fxml="$GCCXML_FILE" || { echo "gccxml failed"; exit; };
+if [ ${USE_CASTXML} -eq 1 ] ; then
+	castxml --castxml-gccxml "$INPUT_FILE" -o "$GCCXML_FILE" || { echo "castxml failed"; exit; };
+else
+	gccxml "$INPUT_FILE" -fxml="$GCCXML_FILE" || { echo "gccxml failed"; exit; };
+fi
+
 xsltproc --stringparam "structs" "$STRUCTS" "$XSL_CONVERTER" "$GCCXML_FILE" > "$OSD_FILE" || echo "xsltproc failed";
 
 rm "$GCCXML_FILE";
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009