Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
libcifpp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
libcifpp
Commits
edcea220
Unverified
Commit
edcea220
authored
Jan 11, 2021
by
Maarten L. Hekkelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
search data_dir as well as cache_dir, for MacOS
parent
a92e85f8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
6 deletions
+28
-6
GNUmakefile.in
+2
-1
configure
+7
-0
configure.ac
+6
-3
src/CifUtils.cpp
+13
-2
No files found.
GNUmakefile.in
View file @
edcea220
...
...
@@ -47,9 +47,10 @@ CCP4DIR = @CCP4@
CLIBD
=
$
(
CCP4DIR:%
=
%/lib/data
)
CACHE_DIR
=
$(DESTDIR)
/var/cache/libcifpp
DATA_DIR
=
$(datadir)
/libcifpp
CRON_DIR
=
$(DESTDIR)
/etc/cron.weekly
DEFINES
+=
CACHE_DIR
=
'"
$(CACHE_DIR)
"'
DEFINES
+=
CACHE_DIR
=
'"
$(CACHE_DIR)
"'
DATA_DIR
=
'"
$(DATA_DIR)
"'
GNUmakefile
:
config.status GNUmakefile.in
$(SHELL)
./config.status
...
...
configure
View file @
edcea220
...
...
@@ -8427,6 +8427,8 @@ func_stripname_cnf ()
esac
}
# func_stripname_cnf
case
$host
in
#(
*
-apple-
*
)
:
...
...
@@ -16066,6 +16068,11 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
# Only expand once:
;;
#(
*
)
:
;;
esac
...
...
configure.ac
View file @
edcea220
...
...
@@ -52,9 +52,12 @@ dnl AC_MSG_RESULT(ok)
AC_PROG_INSTALL
dnl Shared libraries are not convenient, esp. on MacOS... sigh
dnl LT_INIT
LT_INIT([disable-shared])
dnl disable shared libraries on MacOS... sigh
AS_CASE([$host],
[*-apple-*], [LT_INIT([disable-shared])],
[LT_INIT]
)
AC_SUBST(LIBTOOL_DEPS)
dnl versioning, first for libtool
...
...
src/CifUtils.cpp
View file @
edcea220
...
...
@@ -1171,9 +1171,20 @@ std::unique_ptr<std::istream> loadResource(std::filesystem::path name)
std
::
unique_ptr
<
std
::
istream
>
result
;
fs
::
path
p
=
name
;
if
(
not
fs
::
exists
(
p
))
p
=
fs
::
path
(
CACHE_DIR
)
/
p
;
{
for
(
const
char
*
dir
:
{
CACHE_DIR
,
DATA_DIR
})
{
auto
p2
=
fs
::
path
(
dir
)
/
p
;
if
(
fs
::
exists
(
p2
))
{
swap
(
p
,
p2
);
break
;
}
}
}
if
(
fs
::
exists
(
p
))
{
std
::
unique_ptr
<
std
::
ifstream
>
file
(
new
std
::
ifstream
(
p
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment