package init

This commit is contained in:
baizg1107 2021-07-28 10:22:29 +08:00
parent 95ccf90a52
commit dd27f91fd6
3 changed files with 167 additions and 0 deletions

View File

@ -0,0 +1,86 @@
From 3563d9b37ebb3a59dd4d5ed1d82882818fd5d1ea Mon Sep 17 00:00:00 2001
From: bzg1107 <preloyalwhite@163.com>
Date: Wed, 28 Jul 2021 16:11:33 +0800
Subject: [PATCH] nexus fix version and nxtranslate xml
---
CMakeLists.txt | 2 --
applications/NXtranslate/text_xml/xml_retriever_dom.cpp | 8 ++++----
applications/NXtranslate/xml_parser.cpp | 8 ++++----
3 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4c50538..8f8b0bd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -69,7 +69,6 @@ endif()
#-----------------------------------------------------------------------------
set (API_VERSION_MAJOR 4)
set (API_VERSION_MINOR 4)
-set (API_VERSION_PATCH 2)
set (API_VERSION "${API_VERSION_MAJOR}.${API_VERSION_MINOR}.${API_VERSION_PATCH}")
set (ABI_CURRENT 1)
set (ABI_REVISION 0)
@@ -78,7 +77,6 @@ set (ABI_VERSION "${ABI_CURRENT}.${ABI_REVISION}.${ABI_AGE}")
set (NEXUS_VERSION_MAJOR 4)
set (NEXUS_VERSION_MINOR 4)
-set (NEXUS_VERSION_PATCH 2)
set (NEXUS_SONAME 4)
set (NAPI_VERSION "${NEXUS_VERSION_MAJOR}.${NEXUS_VERSION_MINOR}.${NEXUS_VERSION_PATCH}")
set (NXLTVERSINFO "${NEXUS_VERSION_MAJOR}:${NEXUS_VERSION_MINOR}:${NEXUS_VERSION_PATCH}")
diff --git a/applications/NXtranslate/text_xml/xml_retriever_dom.cpp b/applications/NXtranslate/text_xml/xml_retriever_dom.cpp
index dcc56f4..dad5403 100644
--- a/applications/NXtranslate/text_xml/xml_retriever_dom.cpp
+++ b/applications/NXtranslate/text_xml/xml_retriever_dom.cpp
@@ -163,8 +163,8 @@ static void my_error(void *user_data, const char* msg, ...){
va_start(args,msg);
// get the position of the error
- int line=getLineNumber(context);
- int col =getColumnNumber(context);
+ int line=xmlSAX2GetLineNumber(context);
+ int col =xmlSAX2GetColumnNumber(context);
// print out the result
char str[70];
@@ -186,8 +186,8 @@ static void my_fatalError(void *user_data, const char* msg, ...){
va_start(args,msg);
// get the position of the error
- int line=getLineNumber(context);
- int col =getColumnNumber(context);
+ int line=xmlSAX2GetLineNumber(context);
+ int col =xmlSAX2GetColumnNumber(context);
// print out the result
char str[70];
diff --git a/applications/NXtranslate/xml_parser.cpp b/applications/NXtranslate/xml_parser.cpp
index 70500a1..7457180 100644
--- a/applications/NXtranslate/xml_parser.cpp
+++ b/applications/NXtranslate/xml_parser.cpp
@@ -463,8 +463,8 @@ static void my_error(void *user_data, const char* msg, ...){
va_start(args,msg);
// get the position of the error
- int line=getLineNumber(context);
- int col =getColumnNumber(context);
+ int line=xmlSAX2GetLineNumber(context);
+ int col =xmlSAX2GetColumnNumber(context);
// print out the result
char str[70];
@@ -486,8 +486,8 @@ static void my_fatalError(void *user_data, const char* msg, ...){
va_start(args,msg);
// get the position of the error
- int line=getLineNumber(context);
- int col =getColumnNumber(context);
+ int line=xmlSAX2GetLineNumber(context);
+ int col =xmlSAX2GetColumnNumber(context);
// print out the result
char str[70];
--
2.30.0

BIN
code-v4.4.3.tar.gz Normal file

Binary file not shown.

81
nexus.spec Normal file
View File

@ -0,0 +1,81 @@
Name: nexus
Version: 4.4.3
Release: 1
Summary: Libraries and tools for the NeXus scientific data file format
# The entire source code is GPLv2+ except nxdir which is MIT
License: LGPLv2+ and MIT and IJG and GPLv2+ and Zlib
URL: http://www.nexusformat.org/
Source0: https://github.com/nexusformat/code/archive/v%{version}/code-v%{version}.tar.gz
Patch0: 0001-nexus-fix-version-and-nxtranslate-xml.patch
BuildRequires: cmake gcc gcc-c++ hdf5-devel hdf-devel make python-docutils
BuildRequires: doxygen libtirpc
Requires: hdf5 hdf mxml
%description
NeXus is common data format for neutron, x-ray, and muon science. This
package provides tools and libraries for accessing these files. The on disk representation is based upon either HDF4, HDF5 or XML.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: hdf5-devel
Requires: hdf-devel
%description devel
The %{name}-devel package contains header files for
developing applications that use %{name}
%package tools
Summary: Applications for reading and writing NeXus files.
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: readline
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(readline)
%description tools
%{summary}.
%prep
%autosetup -p1 -n code-%{version}
%build
%cmake \
-DENABLE_HDF5=1 \
-DENABLE_CXX=1 \
-DENABLE_APPS=1 .
make %{?_smp_mflags}
%install
%make_install
%files
%license COPYING
%doc %{_datadir}/doc/NeXus/README.doc
%{_libdir}/lib*.so.*
%files devel
%license COPYING
%{_includedir}/nexus/
%{_libdir}/pkgconfig/
%{_libdir}/lib*.so
%{_libdir}/lib*.a
%files tools
%{_bindir}/nxbrowse
%{_bindir}/nxconvert
%{_bindir}/nxsummary
%{_bindir}/nxtranslate
%{_bindir}/nxtraverse
%{_mandir}/man1/nxbrowse.1.gz
%{_mandir}/man1/nxconvert.1.gz
%{_mandir}/man1/nxsummary.1.gz
%license %{_datadir}/doc/NeXus/programs/nxdir/LICENSE
%doc %{_datadir}/doc/NeXus/programs/nxdir/CHANGES
%doc %{_datadir}/doc/NeXus/programs/nxdir/README
%doc %{_datadir}/doc/NeXus/programs/nxdir/TODO
%{_bindir}/nxdir
%{_mandir}/man1/nxdir.1.gz
%changelog
* Tue Jul 13 2021 baizhonggui <baizhonggui@huawei.com> - 4.4.3-1
- Package init