Skip to content

Commit

Permalink
mdcached-1.0.9 (untested)
Browse files Browse the repository at this point in the history
  • Loading branch information
fd00 committed Jan 10, 2025
1 parent 0ac69a8 commit a0b8402
Show file tree
Hide file tree
Showing 4 changed files with 136 additions and 184 deletions.
61 changes: 29 additions & 32 deletions mdcached/README
Original file line number Diff line number Diff line change
@@ -1,52 +1,47 @@
mdcached
------------------------------------------
Bullet cache is an innovative solution to Web application cache problems.
Where other cache servers fail by not providing the application enough control
over its data, Bullet cache offers a unique interface which enables complex
Bullet cache is an innovative solution to Web application cache problems. Where
other cache servers fail by not providing the application enough control over
its data, Bullet cache offers a unique interface which enables complex
interactions between the application and its cached data.

Contrasted to most similar products, Bullet cache is designed to make the most
use of multiprocessor systems and optimizes simultaneous access by a large
number of users.

Runtime requirements:
cygwin-2.4.1-1
libgcc1-4.9.3-1
libmdcached-devel-1.0.5-1bl2
libmdcached0-1.0.5-1bl2
libstdc++6-4.9.3-1
cygwin-3.5.4-1
libgcc1-12.4.0-3
libmdcached-devel-1.0.9-1bl1
libmdcached1-1.0.9-1bl1
libstdc++6-12.4.0-3
pkg-config-2.3.0-1

Build requirements:
(besides corresponding -devel packages)
autoconf-13-1
automake-9-1
binutils-2.25-4
cygport-0.20.2-1
gcc-core-4.9.3-1
gcc-g++-4.9.3-1
libtool-2.4.6-2
make-4.1-1
binutils-2.43.1-1
cmake-3.28.3-1
cygport-0.36.9-1
gcc-core-12.4.0-3
gcc-g++-12.4.0-3
ninja-1.12.0-1

Canonical website:
http://mdcached.sf.net/
https://sourceforge.net/projects/mdcached/

Canonical download:
mirror://sourceforge/mdcached/mdcached-1.0.5.tgz
mirror://sourceforge/mdcached/mdcached-1.0.9.tgz

-------------------------------------------

Build instructions:
1. unpack mdcached-1.0.5-X-src.tar.xz
1. unpack mdcached-1.0.9-X-src.tar.xz
2. if you use setup to install this src package,
it will be unpacked under /usr/src automatically
% cd /usr/src
% cygport ./mdcached-1.0.5-X.cygport all
% cygport ./mdcached-1.0.9-X.cygport all

This will create:
/usr/src/mdcached-1.0.5-X-src.tar.xz
/usr/src/mdcached-1.0.5-X.tar.xz
/usr/src/libmdcached0-1.0.5-X.tar.xz
/usr/src/libmdcached-devel-1.0.5-X.tar.xz
/usr/src/mdcached-1.0.9-X-src.tar.xz
/usr/src/mdcached-1.0.9-X.tar.xz
/usr/src/libmdcached1-1.0.9-X.tar.xz
/usr/src/libmdcached-devel-1.0.9-X.tar.xz

-------------------------------------------

Expand All @@ -57,16 +52,15 @@ Files included in the binary package:
/usr/share/doc/Cygwin/mdcached.README
/usr/share/doc/mdcached/BENCHMARK.txt
/usr/share/doc/mdcached/BENCHMARK_results.txt
/usr/share/doc/mdcached/COPYRIGHT.txt
/usr/share/doc/mdcached/CHANGELOG.txt
/usr/share/doc/mdcached/PLAN.txt
/usr/share/doc/mdcached/README.txt
/usr/share/doc/mdcached/TODO.txt
/usr/share/doc/mdcached/UserGuide.txt
/usr/share/doc/mdcached/mdcached.txt
/usr/share/man/man1/mdcached.1.gz

(libmdcached0)
/usr/bin/cygmdcached-0.dll
(libmdcached1)
/usr/bin/cygmdcached-1.dll

(libmdcached-devel)
/usr/include/mc_client.h
Expand All @@ -78,6 +72,9 @@ Files included in the binary package:

Port Notes:

----- version 1.0.9-1bl1 -----
Version bump.

----- version 1.0.5-1bl2 -----
Rebuild on x86_64

Expand Down
141 changes: 0 additions & 141 deletions mdcached/mdcached-1.0.5-1bl2.src.patch

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,38 +1,40 @@
HOMEPAGE="http://${PN}.sf.net/"
HOMEPAGE="https://sourceforge.net/projects/${PN}/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tgz"

CATEGORY="Net"
SUMMARY="Bullet Cache / MultiDomain Cache Daemon"
DESCRIPTION="Bullet cache is an innovative solution to Web application cache problems.
Where other cache servers fail by not providing the application enough control
over its data, Bullet cache offers a unique interface which enables complex
interactions between the application and its cached data.
interactions between the application and its cached data."

Contrasted to most similar products, Bullet cache is designed to make the most
use of multiprocessor systems and optimizes simultaneous access by a large
number of users."
# LICENSE=""
# LICENSE_SPDX="SPDX-License-Identifier: "
# LICENSE_URI=""

inherit cmake

DOCS="
${PN}/*.txt
${PN}/doc/*.txt
CHANGELOG.txt
mdcached/doc/*.txt
"

PKG_NAMES="
${PN}
lib${PN}0
lib${PN}1
lib${PN}-devel
"
mdcached_CONTENTS="
usr/bin/*.exe
usr/share
"
libmdcached0_CONTENTS="
usr/bin/*.dll
libmdcached1_CONTENTS="
usr/bin/cyg*-1.dll
"
libmdcached_devel_CONTENTS="
usr/include
usr/lib
"
mdcached_SUMMARY="${SUMMARY} (utilities)"
libmdcached0_SUMMARY="${SUMMARY} (runtime)"
libmdcached1_SUMMARY="${SUMMARY} (runtime)"
libmdcached_devel_SUMMARY="${SUMMARY} (development)"
94 changes: 94 additions & 0 deletions mdcached/mdcached-1.0.9-1bl1.src.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
--- origsrc/mdcached-1.0.9/CMakeLists.txt 1970-01-01 09:00:00.000000000 +0900
+++ src/mdcached-1.0.9/CMakeLists.txt 2025-01-10 20:01:21.759232900 +0900
@@ -0,0 +1,58 @@
+cmake_minimum_required(VERSION 3.28)
+project(mdcached
+ VERSION 1.0.9
+ DESCRIPTION "Bullet Cache / MultiDomain Cache Daemon"
+ HOMEPAGE_URL "https://sourceforge.net/projects/mdcached/")
+
+set(CMAKE_CXX_STANDARD 14)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+add_compile_options(-D_GNU_SOURCE)
+
+include(GNUInstallDirs)
+include(CTest)
+
+set(BIN_SOURCES
+ mdcached/server.cpp
+ mdcached/ServerClientConnection.cpp
+ mdcached/ServerWorkerThread.cpp
+ mdcached/ServerNetworkThread.cpp
+ mdcached/ServerReaperThread.cpp
+ mdcached/ServerMonitorThread.cpp
+ mdcached/DataStore.cpp
+ mdcached/BackendMesh.cpp
+ mdcached/LockPool.cpp
+ mdcached/logger.c
+ mdcached/common_utils.c
+ mdcached/MurmurHash3.cpp
+)
+add_executable(mdcached_exe ${BIN_SOURCES})
+set_target_properties(mdcached_exe PROPERTIES OUTPUT_NAME mdcached)
+install(TARGETS mdcached_exe RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+
+set(LIB_SOURCES
+ mdcached/client.c
+ mdcached/common_utils.c
+)
+add_library(mdcached SHARED ${LIB_SOURCES})
+set_target_properties(mdcached PROPERTIES SOVERSION 1)
+install(TARGETS mdcached
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+
+install(FILES mdcached/mc_client.h mdcached/mc_protocol.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+
+install(FILES mdcached/doc/mdcached.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
+
+add_executable(mdcached_test mdcached/test_mdcached.c)
+target_link_libraries(mdcached_test PRIVATE mdcached)
+add_executable(bench_mdcached mdcached/bench_mdcached.c mdcached/bench_utils.c)
+target_link_libraries(bench_mdcached PRIVATE mdcached)
+add_executable(bench_mdcached_async mdcached/bench_mdcached_async.c mdcached/bench_utils.c)
+target_link_libraries(bench_mdcached_async PRIVATE mdcached)
+
+set(prefix ${CMAKE_INSTALL_PREFIX})
+set(exec_prefix ${CMAKE_INSTALL_PREFIX})
+set(libdir ${CMAKE_INSTALL_PREFIX}/lib)
+set(includedir ${CMAKE_INSTALL_PREFIX}/include)
+configure_file(${CMAKE_SOURCE_DIR}/mdcached.pc.in ${CMAKE_BINARY_DIR}/mdcached.pc @ONLY)
+install(FILES ${CMAKE_BINARY_DIR}/mdcached.pc DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig)
--- origsrc/mdcached-1.0.9/mdcached/server.cpp 2014-01-09 22:11:25.000000000 +0900
+++ src/mdcached-1.0.9/mdcached/server.cpp 2025-01-10 19:30:20.569138800 +0900
@@ -402,7 +402,7 @@ network_loop()
if (evs == NULL)
mc_log(LOG_CRIT, "Error allocating evs: %s", strerror(errno));

- CRIT_ASSERT((evq = ev_create_queue()) >= 0);
+ CRIT_ASSERT((evq = ev_create_queue()));
/* Add server sockets to event queue */
ne = 0;
for (std::list<ServerClientConnection*>::iterator it = connections.begin(); it != connections.end(); it++) {
@@ -641,7 +641,7 @@ setup_server()
mc_log(LOG_CRIT, "Cannot create Unix socket: %s", strerror(errno));
strncpy(sun.sun_path, unix_soname, sizeof(sun.sun_path));
sun.sun_family = AF_LOCAL;
-#ifdef __BSD_VISIBLE
+#if defined(__BSD_VISIBLE) && !defined(__CYGWIN__)
sun.sun_len = strlen(unix_soname);
#endif
/* Delete the old file/socket if it exists */
--- origsrc/mdcached-1.0.9/mdcached.pc.in 1970-01-01 09:00:00.000000000 +0900
+++ src/mdcached-1.0.9/mdcached.pc.in 2025-01-10 20:01:30.477137700 +0900
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: mdcached
+Description: Bullet Cache / MultiDomain Cache Daemon
+Version: @PROJECT_VERSION@
+Libs: -L${libdir} -lmdcached
+Cflags: -I${includedir}

0 comments on commit a0b8402

Please sign in to comment.