package init
This commit is contained in:
parent
202af813c1
commit
687877dc5d
36
README.en.md
36
README.en.md
@ -1,36 +0,0 @@
|
|||||||
# cfitsio
|
|
||||||
|
|
||||||
#### Description
|
|
||||||
Library for manipulating FITS data files.
|
|
||||||
|
|
||||||
#### Software Architecture
|
|
||||||
Software architecture description
|
|
||||||
|
|
||||||
#### Installation
|
|
||||||
|
|
||||||
1. xxxx
|
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### Instructions
|
|
||||||
|
|
||||||
1. xxxx
|
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### Contribution
|
|
||||||
|
|
||||||
1. Fork the repository
|
|
||||||
2. Create Feat_xxx branch
|
|
||||||
3. Commit your code
|
|
||||||
4. Create Pull Request
|
|
||||||
|
|
||||||
|
|
||||||
#### Gitee Feature
|
|
||||||
|
|
||||||
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
|
|
||||||
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
|
|
||||||
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
|
|
||||||
4. The most valuable open source project [GVP](https://gitee.com/gvp)
|
|
||||||
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
|
|
||||||
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
|
||||||
37
README.md
37
README.md
@ -1,37 +0,0 @@
|
|||||||
# cfitsio
|
|
||||||
|
|
||||||
#### 介绍
|
|
||||||
Library for manipulating FITS data files.
|
|
||||||
|
|
||||||
#### 软件架构
|
|
||||||
软件架构说明
|
|
||||||
|
|
||||||
|
|
||||||
#### 安装教程
|
|
||||||
|
|
||||||
1. xxxx
|
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### 使用说明
|
|
||||||
|
|
||||||
1. xxxx
|
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### 参与贡献
|
|
||||||
|
|
||||||
1. Fork 本仓库
|
|
||||||
2. 新建 Feat_xxx 分支
|
|
||||||
3. 提交代码
|
|
||||||
4. 新建 Pull Request
|
|
||||||
|
|
||||||
|
|
||||||
#### 码云特技
|
|
||||||
|
|
||||||
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
|
|
||||||
2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com)
|
|
||||||
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目
|
|
||||||
4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目
|
|
||||||
5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
|
|
||||||
6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
|
||||||
14
cfitsio-ldflags.patch
Normal file
14
cfitsio-ldflags.patch
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
diff -Naur cfitsio/configure cfitsio.ldflags/configure
|
||||||
|
--- cfitsio/configure 2018-05-09 21:16:00.000000000 +0200
|
||||||
|
+++ cfitsio.ldflags/configure 2018-05-23 17:17:18.452431657 +0200
|
||||||
|
@@ -4215,8 +4215,8 @@
|
||||||
|
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||||
|
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||||
|
|
||||||
|
-LDFLAGS="$CFLAGS"
|
||||||
|
-LDFLAGS_BIN="$LDFLAGS"
|
||||||
|
+# LDFLAGS="$CFLAGS"
|
||||||
|
+LDFLAGS_BIN="$CFLAGS"
|
||||||
|
|
||||||
|
if test "x$FC" = "xnone" ; then
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: cfitsio: == Fortran compiler search has been overridden" >&5
|
||||||
13
cfitsio-noversioncheck.patch
Normal file
13
cfitsio-noversioncheck.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
diff -Naur cfitsio/longnam.h cfitsio.noversioncheck/longnam.h
|
||||||
|
--- cfitsio/longnam.h 2017-09-20 21:40:41.000000000 +0200
|
||||||
|
+++ cfitsio.noversioncheck/longnam.h 2018-02-23 14:42:36.246522445 +0100
|
||||||
|
@@ -19,7 +19,8 @@
|
||||||
|
that was used to build the CFITSIO library is compatible with the version
|
||||||
|
as included when compiling the application program
|
||||||
|
*/
|
||||||
|
-#define fits_open_file(A, B, C, D) ffopentest( CFITSIO_SONAME, A, B, C, D)
|
||||||
|
+/*#define fits_open_file(A, B, C, D) ffopentest( CFITSIO_SONAME, A, B, C, D)*/
|
||||||
|
+#define fits_open_file ffopen
|
||||||
|
|
||||||
|
#define fits_open_data ffdopn
|
||||||
|
#define fits_open_extlist ffeopn
|
||||||
19
cfitsio-pkgconfig.patch
Normal file
19
cfitsio-pkgconfig.patch
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
diff -ur cfitsio/cfitsio.pc.in cfitsio.new/cfitsio.pc.in
|
||||||
|
--- cfitsio/cfitsio.pc.in 2013-04-08 20:11:56.000000000 +0200
|
||||||
|
+++ cfitsio.new/cfitsio.pc.in 2013-07-10 18:42:11.105358864 +0200
|
||||||
|
@@ -1,11 +1,11 @@
|
||||||
|
prefix=@prefix@
|
||||||
|
exec_prefix=@exec_prefix@
|
||||||
|
libdir=@libdir@
|
||||||
|
-includedir=@includedir@
|
||||||
|
+includedir=@includedir@/cfitsio
|
||||||
|
|
||||||
|
Name: cfitsio
|
||||||
|
Description: FITS File Subroutine Library
|
||||||
|
Version: @CFITSIO_MAJOR@.@CFITSIO_MINOR@
|
||||||
|
-Libs: -L${libdir} -lcfitsio @LIBS@
|
||||||
|
-Libs.private: -lm
|
||||||
|
-Cflags: -I${includedir}
|
||||||
|
+Libs: -L${libdir} -lcfitsio
|
||||||
|
+Libs.private: -lm -lz @LIBS@
|
||||||
|
+Cflags: -D_REENTRANT -I${includedir}
|
||||||
60
cfitsio-zlib.patch
Normal file
60
cfitsio-zlib.patch
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
diff -Naur cfitsio/Makefile.in cfitsio.zlib/Makefile.in
|
||||||
|
--- cfitsio/Makefile.in 2018-05-09 21:16:01.000000000 +0200
|
||||||
|
+++ cfitsio.zlib/Makefile.in 2018-05-23 13:54:43.878032943 +0200
|
||||||
|
@@ -67,9 +67,7 @@
|
||||||
|
pliocomp.c fits_hcompress.c fits_hdecompress.c \
|
||||||
|
simplerng.c @GSIFTP_SRC@
|
||||||
|
|
||||||
|
-ZLIB_SOURCES = zlib/adler32.c zlib/crc32.c zlib/deflate.c zlib/infback.c \
|
||||||
|
- zlib/inffast.c zlib/inflate.c zlib/inftrees.c zlib/trees.c \
|
||||||
|
- zlib/uncompr.c zlib/zcompress.c zlib/zuncompress.c zlib/zutil.c
|
||||||
|
+ZLIB_SOURCES = zlib/zcompress.c zlib/zuncompress.c
|
||||||
|
|
||||||
|
SOURCES = ${CORE_SOURCES} ${ZLIB_SOURCES} @F77_WRAPPERS@
|
||||||
|
|
||||||
|
@@ -102,7 +100,7 @@
|
||||||
|
shared: lib${PACKAGE}${SHLIB_SUFFIX}
|
||||||
|
|
||||||
|
lib${PACKAGE}${SHLIB_SUFFIX}: ${OBJECTS}
|
||||||
|
- ${SHLIB_LD} ${LDFLAGS} -o ${CFITSIO_SHLIB} ${OBJECTS} -lm ${LIBS}
|
||||||
|
+ ${SHLIB_LD} ${LDFLAGS} -o ${CFITSIO_SHLIB} ${OBJECTS} -lm -lz -lbz2 ${LIBS}
|
||||||
|
@if [ "x${CFITSIO_SHLIB_SONAME}" != x ]; then \
|
||||||
|
ln -sf ${CFITSIO_SHLIB} ${CFITSIO_SHLIB_SONAME}; \
|
||||||
|
ln -sf ${CFITSIO_SHLIB_SONAME} $@; \
|
||||||
|
@@ -139,28 +137,28 @@
|
||||||
|
${CC} -c ${CFLAGS} ${CPPFLAGS} ${SSE_FLAGS} ${DEFS} $<
|
||||||
|
|
||||||
|
smem: smem.o lib${PACKAGE}.a ${OBJECTS}
|
||||||
|
- ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm
|
||||||
|
+ ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm -lz
|
||||||
|
|
||||||
|
testprog: testprog.o lib${PACKAGE}.a ${OBJECTS}
|
||||||
|
- ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm ${LIBS}
|
||||||
|
+ ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm -lz ${LIBS}
|
||||||
|
|
||||||
|
fpack: fpack.o fpackutil.o lib${PACKAGE}.a ${OBJECTS}
|
||||||
|
- ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o fpackutil.o -L. -l${PACKAGE} -lm ${LIBS}
|
||||||
|
+ ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o fpackutil.o -L. -l${PACKAGE} -lm -lz ${LIBS}
|
||||||
|
|
||||||
|
funpack: funpack.o fpackutil.o lib${PACKAGE}.a ${OBJECTS}
|
||||||
|
- ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o fpackutil.o -L. -l${PACKAGE} -lm ${LIBS}
|
||||||
|
+ ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o fpackutil.o -L. -l${PACKAGE} -lm -lz ${LIBS}
|
||||||
|
|
||||||
|
fitscopy: fitscopy.o lib${PACKAGE}.a ${OBJECTS}
|
||||||
|
- ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm ${LIBS}
|
||||||
|
+ ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm -lz ${LIBS}
|
||||||
|
|
||||||
|
speed: speed.o lib${PACKAGE}.a ${OBJECTS}
|
||||||
|
- ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm ${LIBS}
|
||||||
|
+ ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm -lz ${LIBS}
|
||||||
|
|
||||||
|
imcopy: imcopy.o lib${PACKAGE}.a ${OBJECTS}
|
||||||
|
- ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm ${LIBS}
|
||||||
|
+ ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm -lz ${LIBS}
|
||||||
|
|
||||||
|
cookbook: cookbook.o lib${PACKAGE}.a ${OBJECTS}
|
||||||
|
- ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm ${LIBS}
|
||||||
|
+ ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm -lz ${LIBS}
|
||||||
|
|
||||||
|
eval: # Rebuild eval_* files from flex/bison source
|
||||||
|
${FLEX} -t eval.l > eval_l.c1
|
||||||
123
cfitsio.spec
Normal file
123
cfitsio.spec
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
Name: cfitsio
|
||||||
|
Version: 3.450
|
||||||
|
Release: 3
|
||||||
|
Summary: Library for manipulating FITS data files
|
||||||
|
License: MIT
|
||||||
|
URL: http://heasarc.gsfc.nasa.gov/fitsio/
|
||||||
|
Source0: https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio3450.tar.gz
|
||||||
|
|
||||||
|
Patch0000: cfitsio-zlib.patch
|
||||||
|
Patch0001: cfitsio-noversioncheck.patch
|
||||||
|
Patch0002: cfitsio-pkgconfig.patch
|
||||||
|
Patch0003: cfitsio-ldflags.patch
|
||||||
|
|
||||||
|
BuildRequires: gcc-gfortran zlib-devel bzip2-devel
|
||||||
|
Requires(post): /sbin/ldconfig
|
||||||
|
Requires(postun): /sbin/ldconfig
|
||||||
|
|
||||||
|
%description
|
||||||
|
CFITSIO is a library of C and FORTRAN subroutines for reading and writing data files
|
||||||
|
in FITS (Flexible Image Transmission System) data format. CFITSIO frees programmers
|
||||||
|
from the internal complexity of the FITS file format by providing a set of easy-to-use
|
||||||
|
high-level routines, thereby simplifying the task of writing software that processes
|
||||||
|
FITS files. At the same time, CFITSIO provides many advanced features, making it the
|
||||||
|
most widely used FITS file programming interface in the astronomy community.
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: Required headers when building programs against cfitsio.
|
||||||
|
Requires: %{name} = %{version}-%{release} pkgconfig
|
||||||
|
Provides: %{name}-static = %{version}-%{release}
|
||||||
|
Obsoletes: %{name}-static < %{version}-%{release}
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
Header files needed when building a program against the cfitsio library.
|
||||||
|
Static cfitsio library.
|
||||||
|
|
||||||
|
%package help
|
||||||
|
Summary: Documentation for cfitsio
|
||||||
|
BuildArch: noarch
|
||||||
|
Provides: %{name}-docs = %{version}-%{release}
|
||||||
|
Obsoletes: %{name}-docs < %{version}-%{release}
|
||||||
|
|
||||||
|
%description help
|
||||||
|
Stand-alone documentation for cfitsio.
|
||||||
|
|
||||||
|
%package -n fpack
|
||||||
|
Summary: FITS image compression and decompression utilities
|
||||||
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description -n fpack
|
||||||
|
fpack can best compress images in FITS format, while funpack can
|
||||||
|
restore them to their original state.
|
||||||
|
|
||||||
|
* Lossless compression of images in integer format using the Rice compression algorithm.
|
||||||
|
* Compression ratio is usually 30% better than GZIP
|
||||||
|
* Compression speed is 3 times faster than GZIP
|
||||||
|
* Decompression speed is the same as GUNZIP
|
||||||
|
|
||||||
|
* Floating point images are compressed using a lossy algorithm
|
||||||
|
* Truncate image pixel noise by a user-specified amount to produce
|
||||||
|
a higher compression rate than lossless techniques
|
||||||
|
* The scientific measurement accuracy in the compressed image (relative
|
||||||
|
to the accuracy in the original image) depends on the amount of compression
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -n cfitsio -p1
|
||||||
|
cd zlib
|
||||||
|
rm adler32.c crc32.c deflate.c infback.c inffast.c inflate.c inflate.h inftrees.c inftrees.h zlib.h \
|
||||||
|
deflate.h trees.c trees.h uncompr.c zconf.h zutil.c zutil.h crc32.h inffast.h inffixed.h
|
||||||
|
cd -
|
||||||
|
|
||||||
|
%build
|
||||||
|
%configure --enable-reentrant --with-bzip2
|
||||||
|
make shared
|
||||||
|
make fpack
|
||||||
|
make funpack
|
||||||
|
|
||||||
|
%check
|
||||||
|
make testprog
|
||||||
|
LD_LIBRARY_PATH=. ./testprog > testprog.lis
|
||||||
|
cmp -s testprog.lis testprog.out
|
||||||
|
cmp -s testprog.fit testprog.std
|
||||||
|
|
||||||
|
%install
|
||||||
|
install -d %{buildroot}%{_bindir}
|
||||||
|
install -d %{buildroot}%{_libdir}
|
||||||
|
install -d %{buildroot}%{_includedir}/%{name}
|
||||||
|
make LIBDIR=%{_libdir} INCLUDEDIR=%{_includedir}/%{name} CFITSIO_LIB=%{buildroot}%{_libdir} \
|
||||||
|
CFITSIO_INCLUDE=%{buildroot}%{_includedir}/%{name} \
|
||||||
|
install
|
||||||
|
cp -p f{,un}pack %{buildroot}%{_bindir}
|
||||||
|
|
||||||
|
chmod 755 %{buildroot}%{_libdir}/libcfitsio.so.*
|
||||||
|
chmod 755 %{buildroot}%{_bindir}/f{,un}pack
|
||||||
|
|
||||||
|
%post -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%postun -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%files
|
||||||
|
%doc README License.txt docs/changes.txt
|
||||||
|
%{_libdir}/libcfitsio.so.*
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%doc cookbook.*
|
||||||
|
%{_includedir}/%{name}
|
||||||
|
%{_libdir}/libcfitsio.so
|
||||||
|
%{_libdir}/pkgconfig/cfitsio.pc
|
||||||
|
|
||||||
|
%files static
|
||||||
|
%doc License.txt
|
||||||
|
%{_libdir}/libcfitsio.a
|
||||||
|
|
||||||
|
%files help
|
||||||
|
%doc docs/fitsio.doc docs/fitsio.pdf docs/cfitsio.pdf License.txt
|
||||||
|
|
||||||
|
%files -n fpack
|
||||||
|
%doc docs/fpackguide.pdf License.txt
|
||||||
|
%{_bindir}/fpack
|
||||||
|
%{_bindir}/funpack
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Wed Mar 04 2020 yangjian<yangjian79@huawei.com> - 3.450-3
|
||||||
|
- Package init
|
||||||
BIN
cfitsio3450.tar.gz
Normal file
BIN
cfitsio3450.tar.gz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user